1 /*
   2  * @test /nodynamiccopyright/
   3  * @bug 8138822
   4  * @summary test that only Java 8+ allows repeating annotations
   5  * @compile WrongVersion.java
   6  * @compile -Xlint:-options -source 8 WrongVersion.java
   7  * @compile/fail/ref=WrongVersion7.out -XDrawDiagnostics -Xlint:-options -source 7 WrongVersion.java
   8  * @compile/fail/ref=WrongVersion6.out -XDrawDiagnostics -Xlint:-options -source 6 WrongVersion.java
   9  */
  10 import java.lang.annotation.Repeatable;
  11 
  12 @Ann(1) @Ann(2)
  13 class C {
  14 }
  15 
  16 @Repeatable(AnnContainer.class)
  17 @interface Ann {
  18     int value();
  19 }
  20 
  21 @interface AnnContainer {
  22     Ann[] value();
  23 }