author | mcimadamore |
Mon, 16 Aug 2010 14:56:23 +0100 | |
changeset 6347 | 947437d52cc1 |
parent 6342 | 228b73431edb |
child 7072 | 4863847e93a5 |
permissions | -rw-r--r-- |
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/ |
6347
947437d52cc1
6976649: javac does not enforce required annotation elements in arrays
mcimadamore
parents:
6342
diff
changeset
|
3 |
* @bug 6881115 6976649 |
6342
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 |
} |
6347
947437d52cc1
6976649: javac does not enforce required annotation elements in arrays
mcimadamore
parents:
6342
diff
changeset
|
17 |
@A(b = @B(b2 = 1, b2 = 2), |
947437d52cc1
6976649: javac does not enforce required annotation elements in arrays
mcimadamore
parents:
6342
diff
changeset
|
18 |
b_arr = {@B(), @B(b2 = 1, b2 = 2)}) |
947437d52cc1
6976649: javac does not enforce required annotation elements in arrays
mcimadamore
parents:
6342
diff
changeset
|
19 |
class T6881115<@A(b = @B(b2 = 1, b2 = 2), |
947437d52cc1
6976649: javac does not enforce required annotation elements in arrays
mcimadamore
parents:
6342
diff
changeset
|
20 |
b_arr = {@B(), @B(b2 = 1, b2 = 2)}) X> {} |