@@ -926,9 +926,7 @@ TypeChecker::applyResultBuilderBodyTransform(FuncDecl *func, Type builderType) {
926
926
// If we encountered an error or there was an explicit result type,
927
927
// bail out and report that to the caller.
928
928
auto &ctx = func->getASTContext ();
929
- auto request =
930
- PreCheckResultBuilderRequest{{AnyFunctionRef (func),
931
- /* SuppressDiagnostics=*/ false }};
929
+ auto request = PreCheckResultBuilderRequest{AnyFunctionRef (func)};
932
930
switch (evaluateOrDefault (ctx.evaluator , request,
933
931
ResultBuilderBodyPreCheck::Error)) {
934
932
case ResultBuilderBodyPreCheck::Okay:
@@ -1144,9 +1142,8 @@ ConstraintSystem::matchResultBuilder(AnyFunctionRef fn, Type builderType,
1144
1142
// not apply the result builder transform if it contained an explicit return.
1145
1143
// To maintain source compatibility, we still need to check for HasReturnStmt.
1146
1144
// https://github.com/apple/swift/issues/64332.
1147
- auto request =
1148
- PreCheckResultBuilderRequest{{fn, /* SuppressDiagnostics=*/ false }};
1149
- switch (evaluateOrDefault (getASTContext ().evaluator , request,
1145
+ switch (evaluateOrDefault (getASTContext ().evaluator ,
1146
+ PreCheckResultBuilderRequest{fn},
1150
1147
ResultBuilderBodyPreCheck::Error)) {
1151
1148
case ResultBuilderBodyPreCheck::Okay:
1152
1149
// If the pre-check was okay, apply the result-builder transform.
@@ -1383,8 +1380,7 @@ ResultBuilderBodyPreCheck PreCheckResultBuilderRequest::evaluate(
1383
1380
// to pre-check them again.
1384
1381
bool skipPrecheck = owner.Fn .getAbstractClosureExpr ();
1385
1382
return PreCheckResultBuilderApplication (
1386
- owner.Fn , skipPrecheck,
1387
- /* suppressDiagnostics=*/ owner.SuppressDiagnostics )
1383
+ owner.Fn , skipPrecheck, /* suppressDiagnostics=*/ false )
1388
1384
.run ();
1389
1385
}
1390
1386
0 commit comments