1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/generics/7034511/T7034511b.java Tue Apr 12 20:56:16 2011 -0700 1.3 @@ -0,0 +1,16 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 7034511 1.7 + * @summary Loophole in typesafety 1.8 + * @compile/fail/ref=T7034511b.out -XDrawDiagnostics T7034511b.java 1.9 + */ 1.10 + 1.11 +class T7034511b { 1.12 + static class MyList<E> { 1.13 + E toArray(E[] e) { return null; } 1.14 + } 1.15 + 1.16 + void test(MyList<?> ml, Object o[]) { 1.17 + ml.toArray(o); 1.18 + } 1.19 +}