1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Annotate.java Fri Apr 29 16:05:56 2011 +0100 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Annotate.java Fri Apr 29 16:06:28 2011 +0100 1.3 @@ -168,11 +168,11 @@ 1.4 } 1.5 JCIdent left = (JCIdent)assign.lhs; 1.6 Symbol method = rs.resolveQualifiedMethod(left.pos(), 1.7 - env, 1.8 - a.type, 1.9 - left.name, 1.10 - List.<Type>nil(), 1.11 - null); 1.12 + env, 1.13 + a.type, 1.14 + left.name, 1.15 + List.<Type>nil(), 1.16 + null); 1.17 left.sym = method; 1.18 left.type = method.type; 1.19 if (method.owner != a.type.tsym) 1.20 @@ -190,6 +190,15 @@ 1.21 Attribute enterAttributeValue(Type expected, 1.22 JCExpression tree, 1.23 Env<AttrContext> env) { 1.24 + //first, try completing the attribution value sym - if a completion 1.25 + //error is thrown, we should recover gracefully, and display an 1.26 + //ordinary resolution diagnostic. 1.27 + try { 1.28 + expected.tsym.complete(); 1.29 + } catch(CompletionFailure e) { 1.30 + log.error(tree.pos(), "cant.resolve", Kinds.kindName(e.sym), e.sym); 1.31 + return new Attribute.Error(expected); 1.32 + } 1.33 if (expected.isPrimitive() || types.isSameType(expected, syms.stringType)) { 1.34 Type result = attr.attribExpr(tree, env, expected); 1.35 if (result.isErroneous())