IDEA-171205 Create local variable from usage: honor most suitable overload by parameter count

This commit is contained in:
Tagir Valeev
2017-04-10 11:25:31 +07:00
parent e5ddd95495
commit f4c6d909ab
3 changed files with 97 additions and 91 deletions

View File

@@ -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);
}
}

View File

@@ -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);
}
}