langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotations.java
equal
deleted
inserted
replaced
53 import com.sun.tools.javac.code.TypeMetadata.Entry.Kind; |
53 import com.sun.tools.javac.code.TypeMetadata.Entry.Kind; |
54 import com.sun.tools.javac.comp.Annotate; |
54 import com.sun.tools.javac.comp.Annotate; |
55 import com.sun.tools.javac.comp.Attr; |
55 import com.sun.tools.javac.comp.Attr; |
56 import com.sun.tools.javac.comp.AttrContext; |
56 import com.sun.tools.javac.comp.AttrContext; |
57 import com.sun.tools.javac.comp.Env; |
57 import com.sun.tools.javac.comp.Env; |
|
58 import com.sun.tools.javac.resources.CompilerProperties.Errors; |
58 import com.sun.tools.javac.tree.JCTree; |
59 import com.sun.tools.javac.tree.JCTree; |
59 import com.sun.tools.javac.tree.TreeInfo; |
60 import com.sun.tools.javac.tree.TreeInfo; |
60 import com.sun.tools.javac.tree.JCTree.JCBlock; |
61 import com.sun.tools.javac.tree.JCTree.JCBlock; |
61 import com.sun.tools.javac.tree.JCTree.JCClassDecl; |
62 import com.sun.tools.javac.tree.JCTree.JCClassDecl; |
62 import com.sun.tools.javac.tree.JCTree.JCExpression; |
63 import com.sun.tools.javac.tree.JCTree.JCExpression; |
478 // If the annotations are also declaration annotations, they are |
479 // If the annotations are also declaration annotations, they are |
479 // illegal as type annotations but might be legal as declaration annotations. |
480 // illegal as type annotations but might be legal as declaration annotations. |
480 // The normal declaration annotation checks make sure that the use is valid. |
481 // The normal declaration annotation checks make sure that the use is valid. |
481 break; |
482 break; |
482 case 1: |
483 case 1: |
483 log.error(typetree.pos(), "cant.type.annotate.scoping.1", |
484 log.error(typetree.pos(), |
484 onlyTypeAnnotations); |
485 Errors.CantTypeAnnotateScoping1(onlyTypeAnnotations.head)); |
485 break; |
486 break; |
486 default: |
487 default: |
487 log.error(typetree.pos(), "cant.type.annotate.scoping", |
488 log.error(typetree.pos(), |
488 onlyTypeAnnotations); |
489 Errors.CantTypeAnnotateScoping(onlyTypeAnnotations)); |
489 } |
490 } |
490 return type; |
491 return type; |
491 } |
492 } |
492 |
493 |
493 // At this point we have visited the part of the nested |
494 // At this point we have visited the part of the nested |