Skip to content

[5.9] [CS] Diagnose UnresolvedPatternExprs as part of constraint solving #66710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2023

Conversation

hamishknight
Copy link
Contributor

5.9 cherry-pick of #66593

  • Explanation: Fixes a crash that could occur when attempting to write a binding pattern within an expression pattern
  • Scope: Affects the type-checking of invalid ExprPatterns
  • Issue: rdar://110638279
  • Risk: Low, only affects invalid expression patterns
  • Testing: Added tests to test suite
  • Reviewer: Pavel Yaskevich

Instead of diagnosing in CSApply, let's create a
fix and diagnose in the solver instead.
Additionally, make sure we assign ErrorTypes to
any VarDecls bound by the invalid pattern, which
fixes a crash.

rdar://110638279
@hamishknight hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Jun 16, 2023
@hamishknight hamishknight requested a review from a team as a code owner June 16, 2023 17:14
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit a00e181 into swiftlang:release/5.9 Jun 17, 2023
@hamishknight hamishknight deleted the pattern-error-5.9 branch June 17, 2023 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants