Andreas Lundblad a76d1ab5a2 8028389: NullPointerException compiling annotation values that have bodies
Made sure anonymous class declarations inside class- and package-level annotations are properly entered.

Reviewed-by: jfranck
2014-01-10 12:47:15 +01:00

13 lines
337 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8028389
* @summary javac should output a proper error message when given something
* like new Object(){} as annotation argument.
*
* @compile AnonSubclassOnPkg.java
* @compile/fail/ref=package-info.out -XDrawDiagnostics package-info.java
*/
@AnonSubclassOnPkg(new Object(){})
package pkg;