test/tools/javac/generics/7034511/T7034511a.java

changeset 0
959103a6100f
child 2525
2eb010b6cb22
equal deleted inserted replaced
-1:000000000000 0:959103a6100f
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 7034511 7040883 7041019
4 * @summary Loophole in typesafety
5 * @compile/fail/ref=T7034511a.out -XDrawDiagnostics T7034511a.java
6 */
7
8 class T7034511a {
9
10 interface A<T> {
11 void foo(T x);
12 }
13
14 interface B<T> extends A<T[]> { }
15
16 static abstract class C implements B<Integer> {
17 <T extends B<?>> void test(T x, String[] ss) {
18 x.foo(ss);
19 }
20 }
21 }

mercurial