langtools/test/tools/javac/annotations/6881115/T6881115.java
author mcimadamore
Thu, 05 Aug 2010 09:44:54 +0100
changeset 6342 228b73431edb
child 6347 947437d52cc1
permissions -rw-r--r--
6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException Summary: default annotation value is not attributed Reviewed-by: jjg, darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6342
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
     1
/*
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
     3
 * @bug     6881115
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
     4
 * @summary javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
     5
 * @author  mcimadamore
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
     6
 * @compile/fail/ref=T6881115.out -XDrawDiagnostics T6881115.java
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
     7
 */
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
     8
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
     9
@interface A {
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
    10
    B b() default @B(b2 = 1, b2 = 2);
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
    11
    B[] b_arr() default {@B(), @B(b2 = 1, b2 = 2)};
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
    12
}
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
    13
@interface B {
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
    14
    String b1();
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
    15
    int b2();
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
    16
}
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
    17
@A
228b73431edb 6881115: javac permits nested anno w/o mandatory attrs => IncompleteAnnotationException
mcimadamore
parents:
diff changeset
    18
class T6881115 {}