1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/annotations/neg/AnonSubclass.java Fri Jan 10 12:47:15 2014 +0100 1.3 @@ -0,0 +1,13 @@ 1.4 +/* 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 8028389 1.7 + * @summary javac should output a proper error message when given something 1.8 + * like new Object(){} as annotation argument. 1.9 + * 1.10 + * @compile/fail/ref=AnonSubclass.out -XDrawDiagnostics AnonSubclass.java 1.11 + */ 1.12 + 1.13 +@AnonSubclass(new Object(){}) 1.14 +@interface AnonSubclass { 1.15 + String value(); 1.16 +}