langtools/test/tools/javac/annotations/typeAnnotations/failures/AnnotatedClassExpr.java
equal
deleted
inserted
replaced
|
1 /* |
|
2 * @test /nodynamiccopyright/ |
|
3 * @bug 8027262 |
|
4 * @summary A class expression cannot be annotated. |
|
5 * @compile/fail/ref=AnnotatedClassExpr.out -XDrawDiagnostics AnnotatedClassExpr.java |
|
6 */ |
|
7 import java.lang.annotation.*; |
|
8 import java.util.List; |
|
9 |
|
10 class AnnotatedClassExpr { |
|
11 static void main() { |
|
12 Object o1 = @A int.class; |
|
13 } |
|
14 } |
|
15 |
|
16 @Target(ElementType.TYPE_USE) |
|
17 @interface A { } |