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

Thu, 31 Aug 2017 15:17:03 +0800

author
aoqi
date
Thu, 31 Aug 2017 15:17:03 +0800
changeset 2525
2eb010b6cb22
parent 1626
7fe9b9d29095
parent 0
959103a6100f
permissions
-rw-r--r--

merge

aoqi@0 1 /**
aoqi@0 2 * @test /nodynamiccopyright/
aoqi@0 3 * @bug 7169362 8001114
aoqi@0 4 * @author sogoel
aoqi@0 5 * @summary Default case not specified for other methods in container annotation
aoqi@0 6 * @compile/fail/ref=MissingDefaultCase1.out -XDrawDiagnostics MissingDefaultCase1.java
aoqi@0 7 */
aoqi@0 8
aoqi@0 9 import java.lang.annotation.Repeatable;
aoqi@0 10
aoqi@0 11 @Repeatable(FooContainer.class)
aoqi@0 12 @interface Foo {}
aoqi@0 13
aoqi@0 14 @interface FooContainer {
aoqi@0 15 Foo[] value();
aoqi@0 16 String other(); // missing default clause
aoqi@0 17 }
aoqi@0 18
aoqi@0 19 @Foo @Foo
aoqi@0 20 public class MissingDefaultCase1 {}

mercurial