diff -r 000000000000 -r 959103a6100f test/tools/javac/annotations/repeatingAnnotations/WrongReturnTypeForValue.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/annotations/repeatingAnnotations/WrongReturnTypeForValue.java Wed Apr 27 01:34:52 2016 +0800 @@ -0,0 +1,21 @@ +/** + * @test /nodynamiccopyright/ + * @bug 7169362 + * @author sogoel + * @summary Wrong return type for value() in ContainerAnnotation + * @compile/fail/ref=WrongReturnTypeForValue.out -XDrawDiagnostics WrongReturnTypeForValue.java + */ + +import java.lang.annotation.Repeatable; + +@Repeatable(FooContainer.class) +@interface Foo { + int getNumbers(); +} + +@interface FooContainer{ + Foo value(); // wrong return type +} + +@Foo @Foo +public class WrongReturnTypeForValue {}