1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/generics/diamond/neg/Neg10.java Wed Apr 27 01:34:52 2016 +0800 1.3 @@ -0,0 +1,18 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 6939620 7020044 1.7 + * 1.8 + * @summary Check that 'complex' diamond can infer type that is too specific 1.9 + * @author mcimadamore 1.10 + * @compile/fail/ref=Neg10.out -source 7 -Xlint:-options Neg10.java -XDrawDiagnostics 1.11 + * @compile Neg10.java -XDrawDiagnostics 1.12 + * 1.13 + */ 1.14 + 1.15 +class Neg10 { 1.16 + static class Foo<X> { 1.17 + Foo(X x) {} 1.18 + } 1.19 + 1.20 + Foo<Number> fw = new Foo<>(1); 1.21 +}