blob: ff29729bc97719d179fee6c342c34968a77db5ea (
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
|
class Test {
interface A<T> {
void _(T... t);
}
static void foo(final A<?> bar) {
bar._("");
}
static void foo1(final A<? extends String> bar) {
bar._("");
}
static void foo2(final A<? extends Integer> bar) {
bar._<error descr="'_(capture<? extends java.lang.Integer>...)' in 'Test.A' cannot be applied to '(java.lang.String)'">("")</error>;
}
public static void main(String[] args) {
foo(new A<Integer>() {
public void _(final Integer... t) {
}
});
}
}
|