mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
show warning on type parameter declaration if it lead to multiple methods with same erasure (java7 only)
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ interface IB{
|
||||
<T> void foo(A<T> x);
|
||||
}
|
||||
class C {
|
||||
<T extends IA & IB> void bar(T x, A<String> y){
|
||||
<<error descr="'foo(A<T>)' in 'pck.IB' clashes with 'foo(A<?>)' in 'pck.IA'; both methods have same erasure, yet neither overrides the other"></error>T extends IA & IB> void bar(T x, A<String> y){
|
||||
x.foo<error descr="Ambiguous method call: both 'IA.foo(A<?>)' and 'IB.foo(A<String>)' match">(y)</error>;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -9,7 +9,7 @@ interface IB{
|
||||
<T> void foo(A<? super A<T>> x);
|
||||
}
|
||||
class C {
|
||||
<T extends IB & IA> void bar(T x, A<A<String>> y){
|
||||
<<error descr="'foo(A<A<T>>)' in 'pck.IA' clashes with 'foo(A<? super A<T>>)' in 'pck.IB'; both methods have same erasure, yet neither overrides the other"></error>T extends IB & IA> void bar(T x, A<A<String>> y){
|
||||
x.foo(y);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user