1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/tools/javac/annotations/repeatingAnnotations/InheritedContainerAnno.java Fri Nov 02 14:35:57 2012 -0700 1.3 @@ -0,0 +1,24 @@ 1.4 +/** 1.5 + * @test /nodynamiccopyright/ 1.6 + * @bug 7169362 1.7 + * @author sogoel 1.8 + * @summary Base anno is Inherited but Container anno is not 1.9 + * @compile/fail/ref=InheritedContainerAnno.out -XDrawDiagnostics InheritedContainerAnno.java 1.10 + */ 1.11 + 1.12 +import java.lang.annotation.ContainedBy; 1.13 +import java.lang.annotation.ContainerFor; 1.14 +import java.lang.annotation.Inherited; 1.15 + 1.16 +@Inherited 1.17 +@ContainedBy(FooContainer.class) 1.18 +@interface Foo {} 1.19 + 1.20 +@ContainerFor(Foo.class) 1.21 +@interface FooContainer{ 1.22 + Foo[] value(); 1.23 +} 1.24 + 1.25 +@Foo @Foo 1.26 +public class InheritedContainerAnno {} 1.27 +