diff -r 75c936d14c6a -r bf76f4190ef8 test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase2.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/annotations/repeatingAnnotations/MissingDefaultCase2.java Fri Nov 02 14:35:57 2012 -0700 @@ -0,0 +1,23 @@ +/** + * @test /nodynamiccopyright/ + * @bug 7169362 + * @author sogoel + * @summary Missing default case for other method and return type is base annotation + * @compile/fail/ref=MissingDefaultCase2.out -XDrawDiagnostics MissingDefaultCase2.java + */ + +import java.lang.annotation.ContainedBy; +import java.lang.annotation.ContainerFor; + +@ContainedBy(FooContainer.class) +@interface Foo {} + +@ContainerFor(Foo.class) +@interface FooContainer { + Foo[] value(); + Foo other(); // missing default clause and return type is an annotation +} + +@Foo @Foo +public class MissingDefaultCase2 {} +