langtools/test/tools/javac/annotations/repeatingAnnotations/MissingValueMethod.java
author jjg
Mon, 14 Jan 2013 13:50:01 -0800
changeset 15356 cf312dc54c60
parent 14371 5652321f1ae4
permissions -rw-r--r--
8006119: update javac to follow latest spec for repeatable annotations Reviewed-by: darcy
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14371
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     1
/**
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     2
 * @test    /nodynamiccopyright/
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     3
 * @bug     7169362
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     4
 * @author   sogoel
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     5
 * @summary Missing value() method in ContainerAnnotation
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     6
 * @compile/fail/ref=MissingValueMethod.out -XDrawDiagnostics MissingValueMethod.java
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     7
 */
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     8
15356
cf312dc54c60 8006119: update javac to follow latest spec for repeatable annotations
jjg
parents: 14371
diff changeset
     9
import java.lang.annotation.Repeatable;
14371
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    10
15356
cf312dc54c60 8006119: update javac to follow latest spec for repeatable annotations
jjg
parents: 14371
diff changeset
    11
@Repeatable(FooContainer.class)
14371
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    12
@interface Foo {}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    13
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    14
@interface FooContainer{
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    15
    Foo[] values();  // wrong method name
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    16
}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    17
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    18
@Foo @Foo
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    19
public class MissingValueMethod {}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    20