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

changeset 0
959103a6100f
child 2525
2eb010b6cb22
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/tools/javac/annotations/repeatingAnnotations/MissingValueMethod.java	Wed Apr 27 01:34:52 2016 +0800
     1.3 @@ -0,0 +1,20 @@
     1.4 +/**
     1.5 + * @test    /nodynamiccopyright/
     1.6 + * @bug     7169362
     1.7 + * @author   sogoel
     1.8 + * @summary Missing value() method in ContainerAnnotation
     1.9 + * @compile/fail/ref=MissingValueMethod.out -XDrawDiagnostics MissingValueMethod.java
    1.10 + */
    1.11 +
    1.12 +import java.lang.annotation.Repeatable;
    1.13 +
    1.14 +@Repeatable(FooContainer.class)
    1.15 +@interface Foo {}
    1.16 +
    1.17 +@interface FooContainer{
    1.18 +    Foo[] values();  // wrong method name
    1.19 +}
    1.20 +
    1.21 +@Foo @Foo
    1.22 +public class MissingValueMethod {}
    1.23 +

mercurial