blob: 5957877044377470e87c6ef9cfca7b074d81900b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
interface I {
void m();
}
interface I1 {
int m();
}
interface I2 {
String m();
}
interface I3<A> {
A m();
}
class AmbiguityRawGenerics {
void foo(I s) { }
void foo(I1 s) { }
void foo(I2 s) { }
<Z> void foo(I3<Z> s) { }
void bar() {
foo<error descr="Ambiguous method call: both 'AmbiguityRawGenerics.foo(I)' and 'AmbiguityRawGenerics.foo(I1)' match">(()-> { throw new RuntimeException(); })</error>;
}
}
|