test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase1.java

changeset 1492
df694c775e8a
parent 1445
376d6c1b49e5
child 1626
7fe9b9d29095
equal deleted inserted replaced
1491:9f42a06a49c0 1492:df694c775e8a
4 * @author sogoel 4 * @author sogoel
5 * @summary Default case not specified for other methods in container annotation 5 * @summary Default case not specified for other methods in container annotation
6 * @compile/fail/ref=MissingDefaultCase1.out -XDrawDiagnostics MissingDefaultCase1.java 6 * @compile/fail/ref=MissingDefaultCase1.out -XDrawDiagnostics MissingDefaultCase1.java
7 */ 7 */
8 8
9 import java.lang.annotation.ContainedBy; 9 import java.lang.annotation.Repeatable;
10 import java.lang.annotation.ContainerFor;
11 10
12 @ContainedBy(FooContainer.class) 11 @Repeatable(FooContainer.class)
13 @interface Foo {} 12 @interface Foo {}
14 13
15 @ContainerFor(Foo.class)
16 @interface FooContainer { 14 @interface FooContainer {
17 Foo[] value(); 15 Foo[] value();
18 String other(); // missing default clause 16 String other(); // missing default clause
19 } 17 }
20 18

mercurial