8057652: Request to improve error messages for labeled declarations
Summary: Parse labeled statements as block statements to improve error recovery for labeled declarations; related cleanup.
Reviewed-by: jjg
/**
* @test /nodynamiccopyright/
* @bug 5012028 6384539
* @summary javac crash when declare an annotation type illegally
*
* @compile/fail IllegalAnnotation.java
* @compile/fail/ref=IllegalAnnotation.out -XDdev -XDrawDiagnostics IllegalAnnotation.java
*/
class IllegalAnnotation {
{
@interface SomeAnnotation { }
}
}