Skip to content

Conversation

@hamishknight
Copy link
Contributor

Make sure we only ever type-check the do body of a do-catch statement when lazily type-checking the bound error type, which we can do for completion.

Resolves #85434
rdar://164481242

Sink the assertion down into `TypeChecker::typeCheckCondition` and
remove the old logic.
…or type

Make sure we only ever type-check the `do` body of a `do-catch`
statement when lazily type-checking the bound error type, which we can
do for completion.

rdar://164481242
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

@hamishknight
Copy link
Contributor Author

@swift-ci please SourceKit stress test

@hamishknight hamishknight merged commit e2287b6 into swiftlang:main Nov 12, 2025
6 of 8 checks passed
@hamishknight hamishknight deleted the whats-the-catch branch November 12, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nullptr crash in ConstraintWalker::walkToExprPost

2 participants