blob: 82d52700459e5a0d083e7e9803d9ee097ca9e29d [file] [log] [blame]
/**
* @test /nodynamiccopyright/
* @bug 7169362
* @author sogoel
* @summary Cyclic annotation not allowed
* @compile/fail/ref=CyclicAnnotation.out -XDrawDiagnostics CyclicAnnotation.java
*/
import java.lang.annotation.Repeatable;
@Repeatable(Foo.class)
@interface Baz {
Foo[] value() default {};
}
@Repeatable(Baz.class)
@interface Foo{
Baz[] value() default {};
}
@Foo(value = {@Baz,@Baz})
@Baz(value = {@Foo,@Foo})
public class CyclicAnnotation {}