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

Sat, 07 Nov 2020 10:30:02 +0800

author
aoqi
date
Sat, 07 Nov 2020 10:30:02 +0800
changeset 3938
93012e2a5d1d
parent 2525
2eb010b6cb22
permissions
-rw-r--r--

Added tag mips-jdk8u275-b01 for changeset eb6ee6a5f2fe

aoqi@0 1 /**
aoqi@0 2 * @test /nodynamiccopyright/
aoqi@0 3 * @bug 7169362
aoqi@0 4 * @author sogoel
aoqi@0 5 * @summary Missing default case for other method and return type is base annotation
aoqi@0 6 * @compile/fail/ref=MissingDefaultCase2.out -XDrawDiagnostics MissingDefaultCase2.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 Foo other(); // missing default clause and return type is an annotation
aoqi@0 17 }
aoqi@0 18
aoqi@0 19 @Foo @Foo
aoqi@0 20 public class MissingDefaultCase2 {}

mercurial