mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
IDEA-171205 Create local variable from usage: honor most suitable overload by parameter count
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// "Create local variable 'xyz'" "true"
|
||||
interface Other<T> {
|
||||
void add(int x, T y);
|
||||
void add(T y);
|
||||
}
|
||||
class A {
|
||||
public void foo(Other<String> other) {
|
||||
String xyz;
|
||||
other.add(xyz);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Create local variable 'xyz'" "true"
|
||||
interface Other<T> {
|
||||
void add(int x, T y);
|
||||
void add(T y);
|
||||
}
|
||||
class A {
|
||||
public void foo(Other<String> other) {
|
||||
other.add(x<caret>yz);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user