mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +07:00
overload resolution: choose one of overload equivalent abstract methods arbitrarily (IDEA-146261)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user