Skip to content

Commit dc9f28f

Browse files
committed
[CS] Avoid setting hadError for diagnoseUnhandledThrowsInAsyncContext
We can still apply the solution even if we emit an error here. No test since it's already covered in the test suite once the next commit is applied.
1 parent a0d33c3 commit dc9f28f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/CSSyntacticElement.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1977,8 +1977,8 @@ class SyntacticElementSolutionApplication
19771977

19781978
// Check to see if the sequence expr is throwing (in async context),
19791979
// if so require the stmt to have a `try`.
1980-
hadError |= diagnoseUnhandledThrowsInAsyncContext(
1981-
context.getAsDeclContext(), forEachStmt);
1980+
diagnoseUnhandledThrowsInAsyncContext(context.getAsDeclContext(),
1981+
forEachStmt);
19821982

19831983
return forEachStmt;
19841984
}

0 commit comments

Comments
 (0)