471 return make.Block(0, stats.toList()); |
471 return make.Block(0, stats.toList()); |
472 } else { |
472 } else { |
473 //non-void to non-void conversion: |
473 //non-void to non-void conversion: |
474 // return (TYPE)BODY; |
474 // return (TYPE)BODY; |
475 JCExpression retExpr = transTypes.coerce(attrEnv, expr, restype); |
475 JCExpression retExpr = transTypes.coerce(attrEnv, expr, restype); |
476 return make.Block(0, List.<JCStatement>of(make.Return(retExpr))); |
476 return make.at(retExpr).Block(0, List.<JCStatement>of(make.Return(retExpr))); |
477 } |
477 } |
478 } |
478 } |
479 |
479 |
480 private JCBlock makeLambdaStatementBody(JCBlock block, final JCMethodDecl lambdaMethodDecl, boolean completeNormally) { |
480 private JCBlock makeLambdaStatementBody(JCBlock block, final JCMethodDecl lambdaMethodDecl, boolean completeNormally) { |
481 final Type restype = lambdaMethodDecl.type.getReturnType(); |
481 final Type restype = lambdaMethodDecl.type.getReturnType(); |