Fri, 02 Nov 2012 14:35:57 -0700
7169362: JDK8: Write compiler tests for repeating annotations for JDK8
Reviewed-by: darcy, jjg
Contributed-by: sonali.goel@oracle.com
mcimadamore@629 | 1 | /* |
mcimadamore@629 | 2 | * @test /nodynamiccopyright/ |
mcimadamore@634 | 3 | * @bug 6881115 6976649 |
mcimadamore@629 | 4 | * @summary javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException |
mcimadamore@629 | 5 | * @author mcimadamore |
mcimadamore@629 | 6 | * @compile/fail/ref=T6881115.out -XDrawDiagnostics T6881115.java |
mcimadamore@629 | 7 | */ |
mcimadamore@629 | 8 | |
mcimadamore@629 | 9 | @interface A { |
mcimadamore@629 | 10 | B b() default @B(b2 = 1, b2 = 2); |
mcimadamore@629 | 11 | B[] b_arr() default {@B(), @B(b2 = 1, b2 = 2)}; |
mcimadamore@629 | 12 | } |
mcimadamore@629 | 13 | @interface B { |
mcimadamore@629 | 14 | String b1(); |
mcimadamore@629 | 15 | int b2(); |
mcimadamore@629 | 16 | } |
mcimadamore@634 | 17 | @A(b = @B(b2 = 1, b2 = 2), |
mcimadamore@634 | 18 | b_arr = {@B(), @B(b2 = 1, b2 = 2)}) |
jjg@722 | 19 | class T6881115</*308 @A(b = @B(b2 = 1, b2 = 2), |
jjg@722 | 20 | b_arr = {@B(), @B(b2 = 1, b2 = 2)})*/ X> {} |