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  */
   9 import java.lang.annotation.Repeatable;
  10 
  11 @Ann(1) @Ann(2)
  12 class C {
  13 }
  14 
  15 @Repeatable(AnnContainer.class)
  16 @interface Ann {
  17     int value();
  18 }
  19 
  20 @interface AnnContainer {
  21     Ann[] value();
  22 }