diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java index 1fa807ebcc0..f59392c658b 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java @@ -199,8 +199,10 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi List annos = t.getAnnotationMirrors(); if (!annos.isEmpty()) { if (prefix) sb.append(' '); - sb.append(annos); - sb.append(' '); + for (Attribute.TypeCompound anno : annos) { + sb.append(anno); + sb.append(' '); + } } return sb.toString(); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java index 0e573844232..865853c27dc 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java @@ -55,6 +55,7 @@ import com.sun.tools.javac.comp.Attr; import com.sun.tools.javac.comp.AttrContext; import com.sun.tools.javac.comp.Env; import com.sun.tools.javac.resources.CompilerProperties.Errors; +import com.sun.tools.javac.resources.CompilerProperties.Fragments; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.JCTree.JCAnnotatedType; import com.sun.tools.javac.tree.JCTree.JCAnnotation; @@ -79,6 +80,7 @@ import com.sun.tools.javac.tree.TreeInfo; import com.sun.tools.javac.tree.TreeScanner; import com.sun.tools.javac.util.Assert; import com.sun.tools.javac.util.Context; +import com.sun.tools.javac.util.JCDiagnostic; import com.sun.tools.javac.util.List; import com.sun.tools.javac.util.ListBuffer; import com.sun.tools.javac.util.Log; @@ -495,22 +497,20 @@ public class TypeAnnotations { */ if (enclTy != null && enclTy.hasTag(TypeTag.NONE)) { - switch (onlyTypeAnnotations.size()) { - case 0: - // Don't issue an error if all type annotations are - // also declaration annotations. - // If the annotations are also declaration annotations, they are - // illegal as type annotations but might be legal as declaration annotations. - // The normal declaration annotation checks make sure that the use is valid. - break; - case 1: - log.error(typetree.pos(), - Errors.CantTypeAnnotateScoping1(onlyTypeAnnotations.head)); - break; - default: - log.error(typetree.pos(), - Errors.CantTypeAnnotateScoping(onlyTypeAnnotations)); + if (onlyTypeAnnotations.isEmpty()) { + // Don't issue an error if all type annotations are + // also declaration annotations. + // If the annotations are also declaration annotations, they are + // illegal as type annotations but might be legal as declaration annotations. + // The normal declaration annotation checks make sure that the use is valid. + return type; } + Type annotated = typeWithAnnotations(type.stripMetadata(), enclTy, annotations); + JCDiagnostic.Fragment annotationFragment = onlyTypeAnnotations.size() == 1 ? + Fragments.TypeAnnotation1(onlyTypeAnnotations.head) : + Fragments.TypeAnnotation(onlyTypeAnnotations); + log.error(typetree.pos(), Errors.TypeAnnotationInadmissible( + annotationFragment, annotated.tsym.owner, annotated)); return type; } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java index acd85b7c9af..7595444b358 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java @@ -5241,7 +5241,14 @@ public class Attr extends JCTree.Visitor { public void visitAnnotatedType(JCAnnotatedType tree) { attribAnnotationTypes(tree.annotations, env); - Type underlyingType = attribType(tree.underlyingType, env); + Type underlyingType = + attribTree(tree.underlyingType, env, new ResultInfo(KindSelector.TYP_PCK, Type.noType)); + if (underlyingType.hasTag(PACKAGE)) { + // Type annotations are not admissible on packages, but we handle packages here to + // report better diagnostics later in validateAnnotatedType. + result = tree.type = underlyingType; + return; + } Type annotatedType = underlyingType.preannotatedType(); if (!env.info.isNewClass) @@ -5850,14 +5857,19 @@ public class Attr extends JCTree.Visitor { } else if (enclTr.hasTag(ANNOTATED_TYPE)) { JCAnnotatedType at = (JCTree.JCAnnotatedType) enclTr; if (enclTy == null || enclTy.hasTag(NONE)) { - if (at.getAnnotations().size() == 1) { - log.error(at.underlyingType.pos(), Errors.CantTypeAnnotateScoping1(at.getAnnotations().head.attribute)); - } else { - ListBuffer comps = new ListBuffer<>(); - for (JCAnnotation an : at.getAnnotations()) { - comps.add(an.attribute); + ListBuffer onlyTypeAnnotationsBuf = new ListBuffer<>(); + for (JCAnnotation an : at.getAnnotations()) { + if (chk.isTypeAnnotation(an, false)) { + onlyTypeAnnotationsBuf.add((Attribute.TypeCompound) an.attribute); } - log.error(at.underlyingType.pos(), Errors.CantTypeAnnotateScoping(comps.toList())); + } + List onlyTypeAnnotations = onlyTypeAnnotationsBuf.toList(); + if (!onlyTypeAnnotations.isEmpty()) { + Fragment annotationFragment = onlyTypeAnnotations.size() == 1 ? + Fragments.TypeAnnotation1(onlyTypeAnnotations.head) : + Fragments.TypeAnnotation(onlyTypeAnnotations); + log.error(at.underlyingType.pos(), Errors.TypeAnnotationInadmissible(annotationFragment, + type.tsym.owner, type.stripMetadata().annotatedType(onlyTypeAnnotations))); } repeat = false; } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties index 0eb89996363..2a64ee1ba03 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties @@ -3258,15 +3258,18 @@ compiler.err.this.as.identifier=\ compiler.err.receiver.parameter.not.applicable.constructor.toplevel.class=\ receiver parameter not applicable for constructor of top-level class -# TODO 308: make a better error message -# 0: annotation -compiler.err.cant.type.annotate.scoping.1=\ - scoping construct cannot be annotated with type-use annotation: {0} +# 0: fragment, 1: symbol, 2: type +compiler.err.type.annotation.inadmissible=\ + {0} not expected here\n\ + (to annotate a qualified type, write {1}.{2}) + +# 0: annotation +compiler.misc.type.annotation.1=\ + type annotation {0} is -# TODO 308: make a better error message # 0: list of annotation -compiler.err.cant.type.annotate.scoping=\ - scoping construct cannot be annotated with type-use annotations: {0} +compiler.misc.type.annotation=\ + type annotations {0} are # 0: type, 1: type compiler.err.incorrect.receiver.name=\ diff --git a/test/langtools/ProblemList.txt b/test/langtools/ProblemList.txt index 48ed5238eb3..28926af0254 100644 --- a/test/langtools/ProblemList.txt +++ b/test/langtools/ProblemList.txt @@ -57,11 +57,6 @@ jdk/jshell/HighlightUITest.java # # javac -tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.java 8057679 generic-all clarify error messages trying to annotate scoping -tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.java 8057679 generic-all clarify error messages trying to annotate scoping -tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass2.java 8057679,8057683 generic-all clarify error messages and improve ordering of errors with type annotations -tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass3.java 8057679,8057683 generic-all clarify error messages and improve ordering of errors with type annotations -tools/javac/annotations/typeAnnotations/newlocations/RepeatingTypeAnnotations.java 8057683 generic-all improve ordering of errors with type annotations tools/javac/annotations/typeAnnotations/referenceinfos/Lambda.java 8057687 generic-all emit correct byte code an attributes for type annotations tools/javac/annotations/typeAnnotations/referenceinfos/NestedTypes.java 8057687 generic-all emit correct byte code an attributes for type annotations tools/javac/warnings/suppress/TypeAnnotations.java 8057683 generic-all improve ordering of errors with type annotations diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.java b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.java index 011a20d2eb6..d7587dfcf5f 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.java @@ -1,9 +1,8 @@ /* * @test /nodynamiccopyright/ - * @bug 8026564 + * @bug 8026564 8043226 * @summary The parts of a fully-qualified type can't be annotated. * @author Werner Dietl - * @ignore 8057679 clarify error messages trying to annotate scoping * @compile/fail/ref=CantAnnotatePackages.out -XDrawDiagnostics CantAnnotatePackages.java */ @@ -14,14 +13,9 @@ 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 of4; - - // TODO: also note the order of error messages. } @Target(ElementType.TYPE_USE) diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.out b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.out index 600d699ebd4..6e2b9cb93b0 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.out +++ b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotatePackages.out @@ -1,5 +1,5 @@ -CantAnnotatePackages.java:14:13: compiler.err.cant.type.annotate.scoping.1: @TA -CantAnnotatePackages.java:19:18: compiler.err.cant.type.annotate.scoping.1: @TA -CantAnnotatePackages.java:20:19: compiler.err.cant.type.annotate.scoping.1: @TA -CantAnnotatePackages.java:21:24: compiler.err.cant.type.annotate.scoping.1: @TA +CantAnnotatePackages.java:14:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @TA), java.lang, @TA java.lang.Object +CantAnnotatePackages.java:16:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @TA), java.lang, @TA java.lang.Object +CantAnnotatePackages.java:17:9: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @TA), java.lang, @TA java.lang.Object +CantAnnotatePackages.java:18:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @TA), java.lang, @TA java.lang.Object 4 errors diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.java b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.java index fa1dd73dc3e..aec691c913d 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.java @@ -1,9 +1,8 @@ /* * @test /nodynamiccopyright/ - * @bug 8006733 8006775 + * @bug 8006733 8006775 8043226 * @summary Ensure behavior for nested types is correct. * @author Werner Dietl - * @ignore 8057679 clarify error messages trying to annotate scoping * @compile/fail/ref=CantAnnotateScoping.out -XDrawDiagnostics CantAnnotateScoping.java */ @@ -35,16 +34,20 @@ class Test { // Legal List li; - // Illegal + // Illegal: inadmissible location for type-use annotations: @TA @TA Outer.SInner osi; - // Illegal + // Illegal: inadmissible location for type-use annotations: @TA List<@TA Outer.SInner> aloi; // Illegal + // 1: inadmissible location for type-use annotations: @TA,@TA2 + // 2: annotation @DA not applicable in this type context Object o1 = new @TA @DA @TA2 Outer.SInner(); // Illegal + // 1: inadmissible location for type-use annotations: @TA + // 2: annotation @DA not applicable in this type context Object o = new ArrayList<@TA @DA Outer.SInner>(); - // Illegal: @TA is only a type-use annotation + // Illegal: inadmissible location for type-use annotations: @TA @TA java.lang.Object f1; // Legal: @DA is only a declaration annotation @@ -53,20 +56,17 @@ class Test { // Legal: @DTA is both a type-use and declaration annotation @DTA java.lang.Object f3; - // Illegal: @TA and @TA2 are only type-use annotations + // Illegal: inadmissible location for type-use annotations: @TA,@TA2 @DTA @DA @TA @DA2 @TA2 java.lang.Object f4; - // Illegal: Do we want one or two messages? - // 1: @DA in invalid location - // 2: Not finding class "lang" + // Illegal: annotation @DA not applicable in this type context java. @DA lang.Object f5; - // Illegal: Do we want one or two messages? - // 1: @DA in invalid location - // 2: Not finding class "XXX" + // Illegal: two messages: + // 1: package java.XXX does not exist + // 2: annotation @DA not applicable in this type context java. @DA XXX.Object f6; - // Illegal: Can't find class "lang". - // Would a different error message be desirable? + // Illegal: inadmissible location for type-use annotations: @TA java. @TA lang.Object f7; } diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.out b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.out index 85118d3f64a..2ae736ad315 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.out +++ b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateScoping.out @@ -1,14 +1,13 @@ -CantAnnotateScoping.java:66:18: compiler.err.doesnt.exist: java.XXX -CantAnnotateScoping.java:38:14: compiler.err.cant.type.annotate.scoping.1: @TA -CantAnnotateScoping.java:40:19: compiler.err.cant.type.annotate.scoping.1: @TA -CantAnnotateScoping.java:47:13: compiler.err.cant.type.annotate.scoping.1: @TA -CantAnnotateScoping.java:56:32: compiler.err.cant.type.annotate.scoping: @TA,@TA2 -CantAnnotateScoping.java:61:19: compiler.err.cant.type.annotate.scoping.1: @DA -CantAnnotateScoping.java:70:19: compiler.err.cant.type.annotate.scoping.1: @TA -CantAnnotateScoping.java:61:11: compiler.err.annotation.type.not.applicable -CantAnnotateScoping.java:66:11: compiler.err.annotation.type.not.applicable -CantAnnotateScoping.java:42:39: compiler.err.cant.type.annotate.scoping: @TA,@DA,@TA2 -CantAnnotateScoping.java:42:25: compiler.err.annotation.type.not.applicable -CantAnnotateScoping.java:44:43: compiler.err.cant.type.annotate.scoping: @TA,@DA -CantAnnotateScoping.java:44:34: compiler.err.annotation.type.not.applicable -13 errors \ No newline at end of file +CantAnnotateScoping.java:68:18: compiler.err.doesnt.exist: java.XXX +CantAnnotateScoping.java:38:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @TA), Test.Outer, @TA Test.Outer.SInner +CantAnnotateScoping.java:51:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @TA), java.lang, @TA java.lang.Object +CantAnnotateScoping.java:60:37: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation: @TA,@TA2), java.lang, @DTA @TA @TA2 java.lang.Object +CantAnnotateScoping.java:40:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @TA), Test.Outer, @TA Test.Outer.SInner +CantAnnotateScoping.java:63:11: compiler.err.annotation.type.not.applicable.to.type: DA +CantAnnotateScoping.java:68:11: compiler.err.annotation.type.not.applicable.to.type: DA +CantAnnotateScoping.java:71:9: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @TA), java.lang, @TA java.lang.Object +CantAnnotateScoping.java:44:34: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation: @TA,@TA2), Test.Outer, @TA @TA2 Test.Outer.SInner +CantAnnotateScoping.java:44:25: compiler.err.annotation.type.not.applicable.to.type: DA +CantAnnotateScoping.java:48:38: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @TA), Test.Outer, @TA Test.Outer.SInner +CantAnnotateScoping.java:48:34: compiler.err.annotation.type.not.applicable.to.type: DA +12 errors diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass2.java b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass2.java index 9f7eca0166c..5a0cac2a8e1 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass2.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass2.java @@ -1,10 +1,8 @@ /* * @test /nodynamiccopyright/ - * @bug 8006733 8006775 + * @bug 8006733 8006775 8043226 * @summary Ensure behavior for nested types is correct. * @author Werner Dietl - * @ignore 8057679 clarify error messages trying to annotate scoping - * @ignore 8057683 improve ordering of errors with type annotations * @compile/fail/ref=CantAnnotateStaticClass2.out -XDrawDiagnostics CantAnnotateStaticClass2.java */ diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass2.out b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass2.out index b6e5d188ed4..4c562ab12f0 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass2.out +++ b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass2.out @@ -1,72 +1,65 @@ -CantAnnotateStaticClass2.java:44:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:45:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:52:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:53:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:55:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:56:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:57:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:57:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:58:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:58:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:60:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:61:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:62:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:64:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:65:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:65:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:66:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:66:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:71:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:72:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:79:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:80:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:87:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:89:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:91:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:93:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:120:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:121:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:128:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:129:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:131:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:133:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:134:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:134:28: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:135:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:135:28: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:137:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:138:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:139:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:141:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:142:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:142:28: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:143:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:143:28: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:149:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:150:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:157:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:158:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:165:27: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:167:27: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:169:27: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:171:27: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:105:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:107:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:112:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:114:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:184:40: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:186:46: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:187:46: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:192:40: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:194:46: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:195:46: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:199:38: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:200:38: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:200:49: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:201:44: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:202:44: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:202:55: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:203:44: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass2.java:203:55: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass2.java:204:52: compiler.err.cant.type.annotate.scoping: @Top.TA,@Top.TB,@Top.TC -71 errors +CantAnnotateStaticClass2.java:44:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:45:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:52:16: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:53:16: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:55:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top, @Top.TA Top.Outer +CantAnnotateStaticClass2.java:56:23: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.Inner +CantAnnotateStaticClass2.java:57:23: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.SInner +CantAnnotateStaticClass2.java:58:23: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.IInner +CantAnnotateStaticClass2.java:60:21: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.Inner +CantAnnotateStaticClass2.java:61:21: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.SInner +CantAnnotateStaticClass2.java:62:21: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.IInner +CantAnnotateStaticClass2.java:64:25: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.Inner +CantAnnotateStaticClass2.java:65:25: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.SInner +CantAnnotateStaticClass2.java:66:25: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.IInner +CantAnnotateStaticClass2.java:71:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:72:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:79:16: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:80:16: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:87:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:89:24: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:91:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:93:24: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:57:12: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:58:12: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:65:12: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:66:12: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:120:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:121:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:128:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:129:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:131:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top, @Top.TA Top.Outer +CantAnnotateStaticClass2.java:133:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, Top.Outer.@Top.TA Inner +CantAnnotateStaticClass2.java:134:17: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:135:17: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:137:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, Top.Outer.@Top.TA Inner +CantAnnotateStaticClass2.java:138:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.SInner +CantAnnotateStaticClass2.java:139:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.IInner +CantAnnotateStaticClass2.java:141:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, Top.Outer.@Top.TA Inner +CantAnnotateStaticClass2.java:142:17: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:143:17: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:149:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:150:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:157:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:158:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:165:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:167:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:169:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:171:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:105:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:107:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:112:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:114:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:184:35: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:186:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:187:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass2.java:192:35: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:194:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:195:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:199:35: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top, @Top.TA Top.Outer +CantAnnotateStaticClass2.java:200:38: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:201:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.IInner +CantAnnotateStaticClass2.java:202:44: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:203:44: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass2.java:204:49: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation: @Top.TA,@Top.TB,@Top.TC), Top.Outer, @Top.TA @Top.TB @Top.TC Top.Outer.IInner +64 errors diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass3.java b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass3.java index 76bc2cb5cfd..4d94b6f12ee 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass3.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass3.java @@ -3,8 +3,6 @@ * @bug 8006733 8006775 8027262 * @summary Ensure behavior for nested types is correct. * @author Werner Dietl - * @ignore 8057679 clarify error messages trying to annotate scoping - * @ignore 8057683 improve order of errors with type annotations * @compile/fail/ref=CantAnnotateStaticClass3.out -XDrawDiagnostics CantAnnotateStaticClass3.java */ diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass3.out b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass3.out index 4f2f989ebf3..c666f205b4a 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass3.out +++ b/test/langtools/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass3.out @@ -1,92 +1,83 @@ -CantAnnotateStaticClass3.java:44:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:45:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:46:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:52:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:53:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:54:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:56:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:57:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:57:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:58:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:58:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:59:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:59:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:61:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:62:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:63:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:65:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:65:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:66:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:66:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:67:12: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:67:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:71:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:72:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:73:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:79:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:80:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:81:14: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:84:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:86:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:88:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:90:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:92:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:94:22: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:120:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:121:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:122:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:128:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:129:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:130:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:132:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:134:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:134:28: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:135:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:135:28: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:136:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:136:28: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:138:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:139:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:140:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:142:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:142:28: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:143:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:143:28: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:144:17: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:144:28: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:149:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:150:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:151:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:157:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:158:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:159:19: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:162:27: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:164:27: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:166:27: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:168:27: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:170:27: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:172:27: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:99:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:101:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:106:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:108:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:113:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:115:23: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:177:40: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:179:46: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:180:46: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:185:40: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:187:46: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:188:46: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:193:40: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:195:46: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:196:46: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:200:38: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:201:38: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:201:49: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:202:44: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:203:44: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:203:55: compiler.err.cant.type.annotate.scoping.1: @Top.TB -CantAnnotateStaticClass3.java:204:44: compiler.err.cant.type.annotate.scoping.1: @Top.TA -CantAnnotateStaticClass3.java:204:55: compiler.err.cant.type.annotate.scoping.1: @Top.TB -91 errors +CantAnnotateStaticClass3.java:44:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:45:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:46:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:52:16: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:53:16: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:54:16: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:56:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top, @Top.TA Top.Outer +CantAnnotateStaticClass3.java:57:23: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.Inner +CantAnnotateStaticClass3.java:58:23: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.SInner +CantAnnotateStaticClass3.java:59:23: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.IInner +CantAnnotateStaticClass3.java:61:21: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.Inner +CantAnnotateStaticClass3.java:62:21: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.SInner +CantAnnotateStaticClass3.java:63:21: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.IInner +CantAnnotateStaticClass3.java:65:25: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.Inner +CantAnnotateStaticClass3.java:66:25: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.SInner +CantAnnotateStaticClass3.java:67:25: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.IInner +CantAnnotateStaticClass3.java:71:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:72:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:73:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:79:16: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:80:16: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:81:16: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:84:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:86:24: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:88:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:90:24: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:92:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:94:24: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:57:12: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:58:12: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:59:12: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:65:12: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:66:12: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:67:12: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:120:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:121:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:122:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:128:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:129:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:130:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:132:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top, @Top.TA Top.Outer +CantAnnotateStaticClass3.java:134:17: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:135:17: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:136:17: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:138:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.Inner +CantAnnotateStaticClass3.java:139:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.SInner +CantAnnotateStaticClass3.java:140:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.IInner +CantAnnotateStaticClass3.java:142:17: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:143:17: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:144:17: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:149:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:150:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:151:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:157:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:158:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:159:14: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:162:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:164:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:166:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:168:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:170:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:172:22: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:99:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:101:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:106:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:108:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:113:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:115:18: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:177:35: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:179:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:180:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.Inner +CantAnnotateStaticClass3.java:185:35: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:187:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:188:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.SInner +CantAnnotateStaticClass3.java:193:35: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:195:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:196:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:200:35: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top, @Top.TA Top.Outer +CantAnnotateStaticClass3.java:201:38: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:202:41: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TA), Top.Outer, @Top.TA Top.Outer.IInner +CantAnnotateStaticClass3.java:203:44: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +CantAnnotateStaticClass3.java:204:44: compiler.err.type.annotation.inadmissible: (compiler.misc.type.annotation.1: @Top.TB), Top.Outer, @Top.TB Top.Outer.IInner +82 errors diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/RepeatingTypeAnnotations.java b/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/RepeatingTypeAnnotations.java index b4a0edc0db6..2dee15e0ce3 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/RepeatingTypeAnnotations.java +++ b/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/RepeatingTypeAnnotations.java @@ -2,10 +2,9 @@ import java.lang.annotation.*; /* * @test /nodynamiccopyright/ - * @bug 8006775 + * @bug 8006775 8043226 * @summary repeating type annotations are possible * @author Werner Dietl - * @ignore 8057683 improve ordering of errors with type annotations * @compile/fail/ref=RepeatingTypeAnnotations.out -XDrawDiagnostics RepeatingTypeAnnotations.java */ diff --git a/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/RepeatingTypeAnnotations.out b/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/RepeatingTypeAnnotations.out index 43c6b34ce47..07b78c06f20 100644 --- a/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/RepeatingTypeAnnotations.out +++ b/test/langtools/tools/javac/annotations/typeAnnotations/newlocations/RepeatingTypeAnnotations.out @@ -11,18 +11,18 @@ RepeatingTypeAnnotations.java:54:28: compiler.err.duplicate.annotation.missing.c RepeatingTypeAnnotations.java:56:21: compiler.err.duplicate.annotation.missing.container: TA RepeatingTypeAnnotations.java:56:36: compiler.err.duplicate.annotation.missing.container: TA RepeatingTypeAnnotations.java:58:19: compiler.err.duplicate.annotation.missing.container: TA -RepeatingTypeAnnotations.java:63:19: compiler.err.duplicate.annotation.missing.container: TA -RepeatingTypeAnnotations.java:63:34: compiler.err.duplicate.annotation.missing.container: TA +RepeatingTypeAnnotations.java:62:19: compiler.err.duplicate.annotation.missing.container: TA +RepeatingTypeAnnotations.java:62:34: compiler.err.duplicate.annotation.missing.container: TA RepeatingTypeAnnotations.java:66:18: compiler.err.duplicate.annotation.missing.container: TA RepeatingTypeAnnotations.java:66:33: compiler.err.duplicate.annotation.missing.container: TA RepeatingTypeAnnotations.java:70:19: compiler.err.duplicate.annotation.missing.container: TA RepeatingTypeAnnotations.java:70:35: compiler.err.duplicate.annotation.missing.container: TA -RepeatingTypeAnnotations.java:74:19: compiler.err.duplicate.annotation.missing.container: TA RepeatingTypeAnnotations.java:74:34: compiler.err.duplicate.annotation.missing.container: TA -RepeatingTypeAnnotations.java:88:37: compiler.err.duplicate.annotation.missing.container: TA -RepeatingTypeAnnotations.java:88:26: compiler.err.duplicate.annotation.missing.container: TA -RepeatingTypeAnnotations.java:88:56: compiler.err.duplicate.annotation.missing.container: TA -RepeatingTypeAnnotations.java:88:72: compiler.err.duplicate.annotation.missing.container: TA +RepeatingTypeAnnotations.java:74:19: compiler.err.duplicate.annotation.missing.container: TA +RepeatingTypeAnnotations.java:78:26: compiler.err.duplicate.annotation.missing.container: TA +RepeatingTypeAnnotations.java:78:37: compiler.err.duplicate.annotation.missing.container: TA +RepeatingTypeAnnotations.java:78:72: compiler.err.duplicate.annotation.missing.container: TA +RepeatingTypeAnnotations.java:78:56: compiler.err.duplicate.annotation.missing.container: TA - compiler.note.unchecked.filename: RepeatingTypeAnnotations.java - compiler.note.unchecked.recompile 25 errors diff --git a/test/langtools/tools/javac/diags/examples/CantAnnotateScoping.java b/test/langtools/tools/javac/diags/examples/CantAnnotateScoping.java index b7de10bc0af..8a1d9ad77bb 100644 --- a/test/langtools/tools/javac/diags/examples/CantAnnotateScoping.java +++ b/test/langtools/tools/javac/diags/examples/CantAnnotateScoping.java @@ -21,7 +21,8 @@ * questions. */ -// key: compiler.err.cant.type.annotate.scoping +// key: compiler.err.type.annotation.inadmissible +// key: compiler.misc.type.annotation import java.lang.annotation.*; diff --git a/test/langtools/tools/javac/diags/examples/CantAnnotateScoping1.java b/test/langtools/tools/javac/diags/examples/CantAnnotateScoping1.java index 72b1c074333..6762f0d1ea7 100644 --- a/test/langtools/tools/javac/diags/examples/CantAnnotateScoping1.java +++ b/test/langtools/tools/javac/diags/examples/CantAnnotateScoping1.java @@ -21,7 +21,8 @@ * questions. */ -// key: compiler.err.cant.type.annotate.scoping.1 +// key: compiler.err.type.annotation.inadmissible +// key: compiler.misc.type.annotation.1 import java.lang.annotation.*;