jdk-24/langtools/test/tools/javac/IllegalAnnotation.java
Priya Lakshmi Muthuswamy 9efc4c1a60 8074364: Update error message for incorrect annotation type declaration
Issue a more direct, specific error when an annotation type is declared where it is disallowed

Reviewed-by: sadayapalam
2017-07-12 12:27:57 +05:30

13 lines
302 B
Java

/**
* @test /nodynamiccopyright/
* @bug 5012028 6384539 8074364
* @summary javac crash when declare an annotation type illegally
*
* @compile/fail/ref=IllegalAnnotation.out -XDrawDiagnostics IllegalAnnotation.java
*/
class IllegalAnnotation {
{
@interface SomeAnnotation { }
}
}