diff -r d94fe2d29b1e -r 380f6c17ea01 test/tools/javac/annotations/neg/AnonSubclass.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/annotations/neg/AnonSubclass.java Fri Jan 10 12:47:15 2014 +0100 @@ -0,0 +1,13 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8028389 + * @summary javac should output a proper error message when given something + * like new Object(){} as annotation argument. + * + * @compile/fail/ref=AnonSubclass.out -XDrawDiagnostics AnonSubclass.java + */ + +@AnonSubclass(new Object(){}) +@interface AnonSubclass { + String value(); +}