check for duplicate methods made linear down from quadratic

This commit is contained in:
Alexey Kudravtsev
2013-07-02 11:51:05 +04:00
parent 2250aa7f04
commit 7400c8f866
9 changed files with 141 additions and 78 deletions

View File

@@ -3,5 +3,5 @@ import java.util.List;
interface A
{
<<error descr="'add(E)' in 'java.util.List' clashes with 'add(E)' in 'java.util.Collection'; both methods have same erasure, yet neither overrides the other"></error>T extends List<?> & Collection<? extends Cloneable>> void foo(T x);
<<error descr="'addAll(Collection<? extends E>)' in 'java.util.Collection' clashes with 'addAll(Collection<? extends E>)' in 'java.util.List'; both methods have same erasure, yet neither overrides the other"></error>T extends List<?> & Collection<? extends Cloneable>> void foo(T x);
}

View File

@@ -70,7 +70,7 @@ class Test {
abstract class F<T extends Throwable> {
<error descr="'foo(F<?>)' is already defined in 'Test.F'">abstract void foo(F<?> y)</error>;
abstract void foo(F<? extends Throwable> y);
<error descr="'foo(F<? extends Throwable>)' is already defined in 'Test.F'">abstract void foo(F<? extends Throwable> y)</error>;
}
}