src/share/classes/com/sun/tools/javac/comp/Attr.java

changeset 2179
8b4e1421a9b7
parent 2167
d2fa3f7e964e
child 2187
4788eb38cac5
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Nov 01 19:08:56 2013 +0000
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Fri Nov 01 21:43:27 2013 +0100
     1.3 @@ -2254,7 +2254,8 @@
     1.4          // empty annotations, if only declaration annotations were given.
     1.5          // This method will raise an error for such a type.
     1.6          for (JCAnnotation ai : annotations) {
     1.7 -            if (typeAnnotations.annotationType(ai.attribute, sym) == TypeAnnotations.AnnotationType.DECLARATION) {
     1.8 +            if (!ai.type.isErroneous() &&
     1.9 +                typeAnnotations.annotationType(ai.attribute, sym) == TypeAnnotations.AnnotationType.DECLARATION) {
    1.10                  log.error(ai.pos(), "annotation.type.not.applicable");
    1.11              }
    1.12          }

mercurial