1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/generics/7022054/T7022054neg1.java Thu Mar 03 17:34:58 2011 +0000 1.3 @@ -0,0 +1,17 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 7022054 1.7 + * 1.8 + * @summary Invalid compiler error on covariant overriding methods with the same erasure 1.9 + * @compile/fail/ref=T7022054neg1.out -XDrawDiagnostics T7022054neg1.java 1.10 + * 1.11 + */ 1.12 + 1.13 +class T7022054neg1 { 1.14 + static class A { 1.15 + A m(String s) { return null; } 1.16 + } 1.17 + static class B extends A { 1.18 + <X extends String> A m(X s) { return null; } 1.19 + } 1.20 +}