overload resolution: choose one of overload equivalent abstract methods arbitrarily (IDEA-146261)

This commit is contained in:
Anna Kozlova
2015-10-12 17:55:36 +02:00
parent 92a570e457
commit d13663483d
4 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import java.util.List;
class Test1 {
interface A {
<T extends Comparable<T>> String foo(List<T> x);
}
interface B {
<K extends Comparable<K>> CharSequence foo(List<K> x);
}
class X {
<S extends A & B> void bar(S x) {
x.foo(null);
}
}
}
class Test2 {
interface A {
void foo();
}
interface B {
void foo();
}
abstract class X implements A, B {
{
foo();
}
}
}