1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java Tue Oct 15 11:20:27 2013 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java Tue Oct 15 19:36:45 2013 +0100 1.3 @@ -424,13 +424,14 @@ 1.4 */ 1.5 private 1.6 boolean isProtectedAccessible(Symbol sym, ClassSymbol c, Type site) { 1.7 + Type newSite = site.hasTag(TYPEVAR) ? site.getUpperBound() : site; 1.8 while (c != null && 1.9 !(c.isSubClass(sym.owner, types) && 1.10 (c.flags() & INTERFACE) == 0 && 1.11 // In JLS 2e 6.6.2.1, the subclass restriction applies 1.12 // only to instance fields and methods -- types are excluded 1.13 // regardless of whether they are declared 'static' or not. 1.14 - ((sym.flags() & STATIC) != 0 || sym.kind == TYP || site.tsym.isSubClass(c, types)))) 1.15 + ((sym.flags() & STATIC) != 0 || sym.kind == TYP || newSite.tsym.isSubClass(c, types)))) 1.16 c = c.owner.enclClass(); 1.17 return c != null; 1.18 } 1.19 @@ -2710,11 +2711,6 @@ 1.20 InferenceContext inferenceContext) { 1.21 MethodResolutionPhase maxPhase = boxingAllowed ? VARARITY : BASIC; 1.22 1.23 - if (site.hasTag(TYPEVAR)) { 1.24 - return resolveMemberReference(pos, env, referenceTree, site.getUpperBound(), 1.25 - name, argtypes, typeargtypes, boxingAllowed, methodCheck, inferenceContext); 1.26 - } 1.27 - 1.28 site = types.capture(site); 1.29 1.30 ReferenceLookupHelper boundLookupHelper;