test/tools/javac/annotations/6881115/T6881115.java

Mon, 23 Sep 2013 17:27:38 +0400

author
kizune
date
Mon, 23 Sep 2013 17:27:38 +0400
changeset 2048
809a50f24d6f
parent 1521
71f35e4b93a5
child 2525
2eb010b6cb22
permissions
-rw-r--r--

7154966: CRs found to be in Fixed state with no test and no noreg- keyword.
Reviewed-by: ksrini

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> {}

mercurial