langtools/test/tools/javac/annotations/repeatingAnnotations/DocumentedContainerAnno.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 Base anno is Documented but Container anno is not
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
     6
 * @compile/fail/ref=DocumentedContainerAnno.out -XDrawDiagnostics DocumentedContainerAnno.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
import java.lang.annotation.Documented;
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    11
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    12
@Documented
15356
cf312dc54c60 8006119: update javac to follow latest spec for repeatable annotations
jjg
parents: 14371
diff changeset
    13
@Repeatable(FooContainer.class)
14371
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    14
@interface Foo {}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    15
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    16
@interface FooContainer{
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    17
    Foo[] value();
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    18
}
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    19
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    20
@Foo @Foo
5652321f1ae4 7169362: JDK8: Write compiler tests for repeating annotations for JDK8
jjg
parents:
diff changeset
    21
public class DocumentedContainerAnno {}