mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
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:
+13
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user