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

changeset 1755
ddb4a2bfcd82
parent 1563
bc456436c613
child 2525
2eb010b6cb22
equal deleted inserted replaced
1754:0384683c64be 1755:ddb4a2bfcd82
25 * @test 25 * @test
26 * @bug 8008077 26 * @bug 8008077
27 * @summary Type annotations in a lazy constant need to be attributed 27 * @summary Type annotations in a lazy constant need to be attributed
28 * in the correct order. 28 * in the correct order.
29 * @author Werner Dietl 29 * @author Werner Dietl
30 * @compile LazyConstantValue.java 30 * @compile/ref=LazyConstantValue.out LazyConstantValue.java
31 */ 31 */
32 32
33 import java.lang.annotation.*; 33 import java.lang.annotation.*;
34 34
35 class ClassA { 35 class ClassA {
38 38
39 class ClassB { 39 class ClassB {
40 static final String[] lcv = new @TA String[0]; 40 static final String[] lcv = new @TA String[0];
41 } 41 }
42 42
43 class ClassC {
44 static final Object o = (@TA Object) null;
45 }
46
43 @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) 47 @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
44 @interface TA {} 48 @interface TA {}

mercurial