Skip to content

Commit e7c4470

Browse files
committed
Sema: Don't need to setThrows() in the synthesized @main function
The body is not type checked, so we check effects on it anyway.
1 parent 09dedaa commit e7c4470

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/Sema/TypeCheckAttr.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1825,7 +1825,6 @@ synthesizeMainBody(AbstractFunctionDecl *fn, void *arg) {
18251825

18261826
auto *callExpr = CallExpr::createImplicit(context, memberRefExpr, {}, {});
18271827
callExpr->setImplicit(true);
1828-
callExpr->setThrows(mainFunction->hasThrows());
18291828
callExpr->setType(context.TheEmptyTupleType);
18301829

18311830
Expr *returnedExpr;

0 commit comments

Comments
 (0)