test/tools/javac/annotations/typeAnnotations/failures/IncompleteArray.java

Print this page


   1 /*
   2  * @test /nodynamiccopyright/
   3  * @bug 6843077 8006775
   4  * @summary test incomplete array declaration
   5  * @author Mahmood Ali
   6  * @compile/fail/ref=IncompleteArray.out -XDrawDiagnostics IncompleteArray.java
   7  */


   8 class IncompleteArray {
   9   int @A [] @A var;
  10 }
  11 

  12 @interface A { }
   1 /*
   2  * @test /nodynamiccopyright/
   3  * @bug 6843077 8006775
   4  * @summary test incomplete array declaration
   5  * @author Mahmood Ali
   6  * @compile/fail/ref=IncompleteArray.out -XDrawDiagnostics IncompleteArray.java
   7  */
   8 import java.lang.annotation.*;
   9 
  10 class IncompleteArray {
  11   int @A [] @A var;
  12 }
  13 
  14 @Target(ElementType.TYPE_USE)
  15 @interface A { }