test/tools/javac/annotations/testCrashNestedAnnos/TestCrashNestedAnnos.java

Mon, 11 Nov 2013 17:26:09 +0100

author
jfranck
date
Mon, 11 Nov 2013 17:26:09 +0100
changeset 2188
f3ca12d680f3
parent 0
959103a6100f
permissions
-rw-r--r--

8027375: javac asserts on nested erroneous annotations
Summary: make sure JCAnnotation trees have type != null before annotation processing
Reviewed-by: jjg

     1 /* @test /nodynamiccopyright/
     2  * @bug 8027375
     3  * @summary Test that javac doesn't assert/crash when there are what looks to
     4  *          be annotations nested inside erroneous annotations.
     5  * @compile/fail/ref=TestCrashNestedAnnos.out -XDrawDiagnostics TestCrashNestedAnnos.java
     6  */
     7 public class TestCrashNestedAnnos {
     8     // A and B are not annotation types
     9     @A(@A1()) int foo() {}
    10     @B(@B1()) int bar() {}
    11 }
    13 class B {}
    14 class B1 {}

mercurial