langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
changeset 24401 0d793293862a
parent 24400 f05df7f58567
child 24609 5139d892e270
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Sat May 10 00:46:47 2014 +0100
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Sat May 10 01:24:35 2014 +0100
@@ -517,6 +517,10 @@
             return new ResultInfo(pkind, pt, newContext);
         }
 
+        protected ResultInfo dup(Type newPt, CheckContext newContext) {
+            return new ResultInfo(pkind, newPt, newContext);
+        }
+
         @Override
         public String toString() {
             if (pt != null) {
@@ -2843,7 +2847,8 @@
             ResultInfo checkInfo =
                     resultInfo.dup(newMethodTemplate(
                         desc.getReturnType().hasTag(VOID) ? Type.noType : desc.getReturnType(),
-                        that.kind.isUnbound() ? argtypes.tail : argtypes, typeargtypes));
+                        that.kind.isUnbound() ? argtypes.tail : argtypes, typeargtypes),
+                        new FunctionalReturnContext(resultInfo.checkContext));
 
             Type refType = checkId(that, lookupHelper.site, refSym, localEnv, checkInfo);