2016-09-16 17:58:23 +00:00
|
|
|
/*
|
|
|
|
* @test /nodynamiccopyright/
|
|
|
|
* @bug 8138822
|
|
|
|
* @summary test that only Java 8+ allows repeating annotations
|
|
|
|
* @compile WrongVersion.java
|
2022-07-29 17:35:22 +00:00
|
|
|
* @compile --release 8 WrongVersion.java
|
2016-09-16 17:58:23 +00:00
|
|
|
*/
|
|
|
|
import java.lang.annotation.Repeatable;
|
|
|
|
|
|
|
|
@Ann(1) @Ann(2)
|
|
|
|
class C {
|
|
|
|
}
|
|
|
|
|
|
|
|
@Repeatable(AnnContainer.class)
|
|
|
|
@interface Ann {
|
|
|
|
int value();
|
|
|
|
}
|
|
|
|
|
|
|
|
@interface AnnContainer {
|
|
|
|
Ann[] value();
|
|
|
|
}
|