blob: 2de2b0e4f5d983983f745e2bac020bff965fec2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import java.util.Collection;
import java.util.List;
interface A
{
<S extends Collection<?> & List<?>> void foo(S x);
<S extends List<?>> void foo(S x);
}
class B
{
public static void main(String[] args) {
A a = null;
a.foo<error descr="Ambiguous method call: both 'A.foo(Collection<?>)' and 'A.foo(List<?>)' match">(null)</error>;
}
}
|