diff -r 000000000000 -r 959103a6100f test/tools/javac/generics/diamond/neg/Neg11.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/generics/diamond/neg/Neg11.java Wed Apr 27 01:34:52 2016 +0800 @@ -0,0 +1,18 @@ +/* + * @test /nodynamiccopyright/ + * @bug 6939620 7020044 + * + * @summary Check that unresolved symbols doesn't cause spurious diamond diagnostics + * @author mcimadamore + * @compile/fail/ref=Neg11.out Neg11.java -XDrawDiagnostics + * + */ + +class Neg11 { + + void test() { + class Foo { } + Foo f1 = new UndeclaredName<>(); //this is deliberate: aim is to test erroneous path + Foo f2 = new UndeclaredName<>() {}; //this is deliberate: aim is to test erroneous path + } +}