aoqi@0: /* aoqi@0: * @test /nodynamiccopyright/ aoqi@0: * @bug 1234567 aoqi@0: * @summary The parts of a fully-qualified type can't be annotated. aoqi@0: * @author Werner Dietl aoqi@0: * @compile/fail/ref=CantAnnotatePackages.out -XDrawDiagnostics CantAnnotatePackages.java aoqi@0: */ aoqi@0: aoqi@0: import java.lang.annotation.*; aoqi@0: import java.util.List; aoqi@0: aoqi@0: class CantAnnotatePackages { aoqi@0: // Before a package component: aoqi@0: @TA java.lang.Object of1; aoqi@0: aoqi@0: // These result in a different error. aoqi@0: // TODO: should this be unified? aoqi@0: aoqi@0: List<@TA java.lang.Object> of2; aoqi@0: java. @TA lang.Object of3; aoqi@0: List of4; aoqi@0: aoqi@0: // TODO: also note the order of error messages. aoqi@0: } aoqi@0: aoqi@0: @Target(ElementType.TYPE_USE) aoqi@0: @interface TA { }