1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/generics/diamond/neg/Neg06.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,17 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 6939620 7020044 1.7 + * 1.8 + * @summary Check that diamond works where LHS is supertype of RHS (nilary constructor) 1.9 + * @author mcimadamore 1.10 + * @compile/fail/ref=Neg06.out Neg06.java -XDrawDiagnostics 1.11 + * 1.12 + */ 1.13 + 1.14 +class Neg06 { 1.15 + 1.16 + static class CSuperFoo<X> {} 1.17 + static class CFoo<X extends Number> extends CSuperFoo<X> {} 1.18 + 1.19 + CSuperFoo<String> csf1 = new CFoo<>(); 1.20 +}