--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java Wed Jun 05 16:58:10 2013 +0400
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java Thu Jun 06 15:30:14 2013 +0100
@@ -1207,7 +1207,7 @@
bestSoFar.kind != AMBIGUOUS && l.nonEmpty();
l = l.tail) {
sym = findField(env, site, name, l.head.tsym);
- if (bestSoFar.kind < AMBIGUOUS && sym.kind < AMBIGUOUS &&
+ if (bestSoFar.exists() && sym.exists() &&
sym.owner != bestSoFar.owner)
bestSoFar = new AmbiguityError(bestSoFar, sym);
else if (sym.kind < bestSoFar.kind)