langtools/test/tools/javac/IllegalAnnotation.java
author pgovereau
Fri, 04 Apr 2014 19:13:53 -0400
changeset 23809 9405883da95f
parent 6150 d055fa8ced62
child 30713 4a01965154be
permissions -rw-r--r--
8023945: javac wrongly allows a subclass of an anonymous class 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 { }
    }
}