Mercurial > hg > openjdk > lambda > langtools
view test/tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.java @ 2550:b0c086cd4520
8026564: import changes from type-annotations forest
Reviewed-by: jjg
Contributed-by: wdietl@gmail.com, steve.sides@oracle.com
author | jjg |
---|---|
date | Tue, 15 Oct 2013 15:57:13 -0700 |
parents | |
children |
line wrap: on
line source
/* * @test /nodynamiccopyright/ * @bug 1234567 * @summary The parts of a fully-qualified type can't be annotated. * @author Werner Dietl * @compile/fail/ref=CantAnnotatePackages.out -XDrawDiagnostics CantAnnotatePackages.java */ import java.lang.annotation.*; import java.util.List; class CantAnnotatePackages { // Before a package component: @TA java.lang.Object of1; // These result in a different error. // TODO: should this be unified? List<@TA java.lang.Object> of2; java. @TA lang.Object of3; List<java. @TA lang.Object> of4; // TODO: also note the order of error messages. } @Target(ElementType.TYPE_USE) @interface TA { }