1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java Tue May 13 14:18:34 2014 +0100 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java Tue May 13 16:11:43 2014 +0100 1.3 @@ -518,6 +518,10 @@ 1.4 return new ResultInfo(pkind, pt, newContext); 1.5 } 1.6 1.7 + protected ResultInfo dup(Type newPt, CheckContext newContext) { 1.8 + return new ResultInfo(pkind, newPt, newContext); 1.9 + } 1.10 + 1.11 @Override 1.12 public String toString() { 1.13 if (pt != null) { 1.14 @@ -2840,7 +2844,8 @@ 1.15 ResultInfo checkInfo = 1.16 resultInfo.dup(newMethodTemplate( 1.17 desc.getReturnType().hasTag(VOID) ? Type.noType : desc.getReturnType(), 1.18 - that.kind.isUnbound() ? argtypes.tail : argtypes, typeargtypes)); 1.19 + that.kind.isUnbound() ? argtypes.tail : argtypes, typeargtypes), 1.20 + new FunctionalReturnContext(resultInfo.checkContext)); 1.21 1.22 Type refType = checkId(that, lookupHelper.site, refSym, localEnv, checkInfo); 1.23