ambiguous method call: choose one method if both are from the same hierarchy as the actual problem is there (IDEA-101529)

This commit is contained in:
anna
2013-02-21 15:23:10 +01:00
parent f27f0ef1dc
commit e869310a92
3 changed files with 20 additions and 1 deletions
@@ -0,0 +1,13 @@
package pck;
class A {
public void bar(I a, Class<Long> any) {
System.out.println(a.with(any));
}
interface I {
<error descr="'with(Class<T>)' clashes with 'with(Class<Long>)'; both methods have same erasure"><T> T with(Class<T> aClass)</error>;
long with(Class<Long> aClass);
}
}
@@ -191,4 +191,8 @@ public class AdvHighlightingJdk7Test extends DaemonAnalyzerTestCase {
public void testAmbiguousIDEA87672() throws Exception {
doTestAmbiguous();
}
public void testAmbiguousMethodsFromSameClassAccess() throws Exception {
doTestAmbiguous();
}
}