convert to diamonds: raise a problem if containing method can't be resolved (IDEA-151540)

This commit is contained in:
Anna Kozlova
2016-02-22 15:59:38 +01:00
parent f9d49fa1f4
commit f09865ef1d
3 changed files with 27 additions and 1 deletions
@@ -11,6 +11,6 @@ abstract class Overloadsss {
{
List<String> l = foo(bar (null));
List<String> l1 = foo(bar1<error descr="Ambiguous method call: both 'Overloadsss.bar1(List<Object>)' and 'Overloadsss.bar1(Set<Object>)' match">(null)</error>);
List<String> l1 = foo(bar1<error descr="Ambiguous method call: both 'Overloadsss.bar1(List<K>)' and 'Overloadsss.bar1(Set<K>)' match">(null)</error>);
}
}
@@ -0,0 +1,23 @@
// "Replace with <>" "false"
import java.util.Collections;
import java.util.List;
class Test {
void testInbound() throws Exception {
final Object[] with = (Object[])with(Collections.<Obj<caret>ect>emptyList());
}
<T> T with(List<T> l) {
return null;
}
public boolean[] with(List<Boolean> matcher) {
return null;
}
public double[] with(List<Double> matcher) {
return null;
}
}