@@ -502,9 +502,7 @@ synthesizeEnumRawValueConstructorBody(AbstractFunctionDecl *afd,
502502 /* implicit*/ true );
503503 assign->setType (TupleType::getEmpty (ctx));
504504
505- auto result = TupleExpr::createEmpty (ctx, SourceLoc (), SourceLoc (),
506- /* Implicit=*/ true );
507- auto ret = new (ctx) ReturnStmt (SourceLoc (), result, /* Implicit=*/ true );
505+ auto ret = new (ctx) ReturnStmt (SourceLoc (), nullptr , /* Implicit=*/ true );
508506
509507 auto body = BraceStmt::create (ctx, SourceLoc (), {assign, ret}, SourceLoc (),
510508 /* implicit*/ true );
@@ -1366,11 +1364,7 @@ synthesizeValueConstructorBody(AbstractFunctionDecl *afd, void *context) {
13661364 }
13671365 }
13681366
1369- auto result = TupleExpr::createEmpty (ctx, SourceLoc (), SourceLoc (),
1370- /* Implicit=*/ true );
1371- result->setType (TupleType::getEmpty (ctx));
1372-
1373- auto ret = new (ctx) ReturnStmt (SourceLoc (), result, /* Implicit=*/ true );
1367+ auto ret = new (ctx) ReturnStmt (SourceLoc (), nullptr , /* Implicit=*/ true );
13741368 stmts.push_back (ret);
13751369
13761370 // Create the function body.
@@ -1567,9 +1561,7 @@ synthesizeRawValueBridgingConstructorBody(AbstractFunctionDecl *afd,
15671561 /* Implicit=*/ true );
15681562 assign->setType (TupleType::getEmpty (ctx));
15691563
1570- auto result = TupleExpr::createEmpty (ctx, SourceLoc (), SourceLoc (),
1571- /* Implicit=*/ true );
1572- auto ret = new (ctx) ReturnStmt (SourceLoc (), result, /* Implicit=*/ true );
1564+ auto ret = new (ctx) ReturnStmt (SourceLoc (), nullptr , /* Implicit=*/ true );
15731565
15741566 auto body = BraceStmt::create (ctx, SourceLoc (), {assign, ret}, SourceLoc ());
15751567 return { body, /* isTypeChecked=*/ true };
0 commit comments