diff -r 4ebc2e2fb97c -r 71c04702a3d5 test/langtools/tools/javac/generics/diamond/neg/Neg10.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/langtools/tools/javac/generics/diamond/neg/Neg10.java Tue Sep 12 19:03:39 2017 +0200 @@ -0,0 +1,18 @@ +/* + * @test /nodynamiccopyright/ + * @bug 6939620 7020044 + * + * @summary Check that 'complex' diamond can infer type that is too specific + * @author mcimadamore + * @compile/fail/ref=Neg10.out -source 7 -Xlint:-options Neg10.java -XDrawDiagnostics + * @compile Neg10.java -XDrawDiagnostics + * + */ + +class Neg10 { + static class Foo { + Foo(X x) {} + } + + Foo fw = new Foo<>(1); +}