1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java Wed Apr 16 18:15:48 2014 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java Fri Apr 18 23:50:41 2014 +0100 1.3 @@ -899,7 +899,7 @@ 1.4 1.5 @Override 1.6 public boolean compatible(Type found, Type req, Warner warn) { 1.7 - found = pendingInferenceContext.asFree(found); 1.8 + found = pendingInferenceContext.asUndetVar(found); 1.9 req = infer.returnConstraintTarget(found, req); 1.10 return super.compatible(found, req, warn); 1.11 } 1.12 @@ -936,8 +936,8 @@ 1.13 1.14 public boolean compatible(Type found, Type req, Warner warn) { 1.15 return strict ? 1.16 - types.isSubtypeUnchecked(found, deferredAttrContext.inferenceContext.asFree(req), warn) : 1.17 - types.isConvertible(found, deferredAttrContext.inferenceContext.asFree(req), warn); 1.18 + types.isSubtypeUnchecked(found, deferredAttrContext.inferenceContext.asUndetVar(req), warn) : 1.19 + types.isConvertible(found, deferredAttrContext.inferenceContext.asUndetVar(req), warn); 1.20 } 1.21 1.22 public void report(DiagnosticPosition pos, JCDiagnostic details) { 1.23 @@ -1142,7 +1142,7 @@ 1.24 Type desc_t = types.findDescriptorType(t); 1.25 Type desc_s = types.findDescriptorType(s); 1.26 if (types.isSameTypes(desc_t.getParameterTypes(), 1.27 - inferenceContext().asFree(desc_s.getParameterTypes()))) { 1.28 + inferenceContext().asUndetVars(desc_s.getParameterTypes()))) { 1.29 if (types.asSuper(t, s.tsym) != null || 1.30 types.asSuper(s, t.tsym) != null) { 1.31 result &= MostSpecificCheckContext.super.compatible(t, s, warn); 1.32 @@ -1169,7 +1169,7 @@ 1.33 Type desc_t = types.findDescriptorType(t); 1.34 Type desc_s = types.findDescriptorType(s); 1.35 if (types.isSameTypes(desc_t.getParameterTypes(), 1.36 - inferenceContext().asFree(desc_s.getParameterTypes()))) { 1.37 + inferenceContext().asUndetVars(desc_s.getParameterTypes()))) { 1.38 if (types.asSuper(t, s.tsym) != null || 1.39 types.asSuper(s, t.tsym) != null) { 1.40 result &= MostSpecificCheckContext.super.compatible(t, s, warn); 1.41 @@ -3152,7 +3152,7 @@ 1.42 if (TreeInfo.isStaticSelector(referenceTree.expr, names) && 1.43 argtypes.nonEmpty() && 1.44 (argtypes.head.hasTag(NONE) || 1.45 - types.isSubtypeUnchecked(inferenceContext.asFree(argtypes.head), site))) { 1.46 + types.isSubtypeUnchecked(inferenceContext.asUndetVar(argtypes.head), site))) { 1.47 return new UnboundMethodReferenceLookupHelper(referenceTree, name, 1.48 site, argtypes, typeargtypes, maxPhase); 1.49 } else { 1.50 @@ -4265,7 +4265,11 @@ 1.51 } 1.52 1.53 DeferredAttrContext deferredAttrContext(Symbol sym, InferenceContext inferenceContext, ResultInfo pendingResult, Warner warn) { 1.54 - return deferredAttr.new DeferredAttrContext(attrMode, sym, step, inferenceContext, pendingResult != null ? pendingResult.checkContext.deferredAttrContext() : deferredAttr.emptyDeferredAttrContext, warn); 1.55 + DeferredAttrContext parent = (pendingResult == null) 1.56 + ? deferredAttr.emptyDeferredAttrContext 1.57 + : pendingResult.checkContext.deferredAttrContext(); 1.58 + return deferredAttr.new DeferredAttrContext(attrMode, sym, step, 1.59 + inferenceContext, parent, warn); 1.60 } 1.61 1.62 /**