diff -r 1192bdc59d82 -r e1efbecefefa langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java Tue Oct 15 11:20:27 2013 -0700 +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java Tue Oct 15 19:36:45 2013 +0100 @@ -424,13 +424,14 @@ */ private boolean isProtectedAccessible(Symbol sym, ClassSymbol c, Type site) { + Type newSite = site.hasTag(TYPEVAR) ? site.getUpperBound() : site; while (c != null && !(c.isSubClass(sym.owner, types) && (c.flags() & INTERFACE) == 0 && // In JLS 2e 6.6.2.1, the subclass restriction applies // only to instance fields and methods -- types are excluded // regardless of whether they are declared 'static' or not. - ((sym.flags() & STATIC) != 0 || sym.kind == TYP || site.tsym.isSubClass(c, types)))) + ((sym.flags() & STATIC) != 0 || sym.kind == TYP || newSite.tsym.isSubClass(c, types)))) c = c.owner.enclClass(); return c != null; } @@ -2710,11 +2711,6 @@ InferenceContext inferenceContext) { MethodResolutionPhase maxPhase = boxingAllowed ? VARARITY : BASIC; - if (site.hasTag(TYPEVAR)) { - return resolveMemberReference(pos, env, referenceTree, site.getUpperBound(), - name, argtypes, typeargtypes, boxingAllowed, methodCheck, inferenceContext); - } - site = types.capture(site); ReferenceLookupHelper boundLookupHelper;