Wed, 08 Oct 2014 14:16:40 -0700
Merge
jjg@1521 | 1 | import java.lang.annotation.Target; |
jjg@1521 | 2 | import java.lang.annotation.ElementType; |
jjg@1521 | 3 | |
mcimadamore@629 | 4 | /* |
mcimadamore@629 | 5 | * @test /nodynamiccopyright/ |
mcimadamore@634 | 6 | * @bug 6881115 6976649 |
mcimadamore@629 | 7 | * @summary javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException |
mcimadamore@629 | 8 | * @author mcimadamore |
mcimadamore@629 | 9 | * @compile/fail/ref=T6881115.out -XDrawDiagnostics T6881115.java |
mcimadamore@629 | 10 | */ |
mcimadamore@629 | 11 | |
jjg@1521 | 12 | @Target({ElementType.TYPE, ElementType.TYPE_PARAMETER, ElementType.ANNOTATION_TYPE}) |
mcimadamore@629 | 13 | @interface A { |
mcimadamore@629 | 14 | B b() default @B(b2 = 1, b2 = 2); |
mcimadamore@629 | 15 | B[] b_arr() default {@B(), @B(b2 = 1, b2 = 2)}; |
mcimadamore@629 | 16 | } |
jjg@1521 | 17 | |
mcimadamore@629 | 18 | @interface B { |
mcimadamore@629 | 19 | String b1(); |
mcimadamore@629 | 20 | int b2(); |
mcimadamore@629 | 21 | } |
jjg@1521 | 22 | |
mcimadamore@634 | 23 | @A(b = @B(b2 = 1, b2 = 2), |
mcimadamore@634 | 24 | b_arr = {@B(), @B(b2 = 1, b2 = 2)}) |
jjg@1521 | 25 | class T6881115<@A(b = @B(b2 = 1, b2 = 2), |
jjg@1521 | 26 | b_arr = {@B(), @B(b2 = 1, b2 = 2)}) X> {} |