8435f0daf2
Reviewed-by: jjg
22 lines
451 B
Java
22 lines
451 B
Java
/**
|
|
* @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;
|
|
}
|