langtools/test/tools/javac/annotations/typeAnnotations/failures/Scopes.java
author jjg
Tue, 15 Oct 2013 15:57:13 -0700
changeset 21041 99f5e5e97425
parent 15385 ee1eebe7e210
permissions -rw-r--r--
8026564: import changes from type-annotations forest Reviewed-by: jjg Contributed-by: wdietl@gmail.com, steve.sides@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     1
/*
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     3
 * @bug 6843077 8006775
21041
99f5e5e97425 8026564: import changes from type-annotations forest
jjg
parents: 15385
diff changeset
     4
 * @summary Unqualified inner type annotation not in scope.
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     5
 * @author Mahmood Ali
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     6
 * @compile/fail/ref=Scopes.out -XDrawDiagnostics Scopes.java
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
     7
 */
21041
99f5e5e97425 8026564: import changes from type-annotations forest
jjg
parents: 15385
diff changeset
     8
import java.lang.annotation.*;
99f5e5e97425 8026564: import changes from type-annotations forest
jjg
parents: 15385
diff changeset
     9
99f5e5e97425 8026564: import changes from type-annotations forest
jjg
parents: 15385
diff changeset
    10
@InnerTA
99f5e5e97425 8026564: import changes from type-annotations forest
jjg
parents: 15385
diff changeset
    11
class Scopes<@InnerTA T extends @InnerTA Object> {
99f5e5e97425 8026564: import changes from type-annotations forest
jjg
parents: 15385
diff changeset
    12
    // The simple name TA is not in scope on header of class.
99f5e5e97425 8026564: import changes from type-annotations forest
jjg
parents: 15385
diff changeset
    13
    // One has to use @Scopes.TA.
99f5e5e97425 8026564: import changes from type-annotations forest
jjg
parents: 15385
diff changeset
    14
    @Target(ElementType.TYPE_USE)
99f5e5e97425 8026564: import changes from type-annotations forest
jjg
parents: 15385
diff changeset
    15
    @interface InnerTA { };
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents:
diff changeset
    16
}