blob: a5d3b058f7099410927cd6e0e49a2bf8b9cd7480 [file] [edit]
/**
* @test /nodynamiccopyright/
* @summary Container annotation is not checked for semantic correctness
* @bug 8001114
*
* @compile/fail/ref=RepeatingTargetNotAllowed.out -XDrawDiagnostics RepeatingTargetNotAllowed.java
*/
import java.lang.annotation.*;
@Repeatable(Foos.class)
@interface Foo {}
@Target(ElementType.ANNOTATION_TYPE)
@interface Foos {
Foo[] value();
}
public class RepeatingTargetNotAllowed {
@Foo @Foo int f = 0;
}