Skip to content

Conversation

@hamishknight
Copy link
Contributor

6.3 partial cherry-pick of #85538

  • Explanation: A couple of low risk crasher fixes, fixing ASTScope logic to ensure we still build a valid scope tree for erroneous condition initializers, and fixing expression pattern constraint generation to invalidate nested unresolved VarDecls early
  • Scope: Affects ASTScope and ExprPattern type-checking logic for invalid code
  • Issue: rdar://164990215
  • Risk: Low, the fixes are straightforward and only affect invalid code
  • Testing: Added tests to test suite
  • Reviewer: Pavel Yaskevich

@hamishknight hamishknight requested a review from hborla November 18, 2025 21:45
@hamishknight hamishknight requested a review from a team as a code owner November 18, 2025 21:45
@hamishknight hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.3 labels Nov 18, 2025
Make sure we invalidate when we initially visit the ExprPattern to
ensure that we don't run into issues when generating constraints for
a `where` clause before the constraints for the ExprPattern. We ought
to change the constraint generation there to use a conjunction to
ensure that the pattern is solved before the `where` clause, but I
want to keep this as a quick low risk fix that we can cherry-pick. I'll
switch it to a conjunction in a follow-up.
This appears unnecessary and incorrectly meant the ErrorExpr would
be placed outside the condition, meaning we could find the binding
in its own initializer.
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 58e66d2 into swiftlang:release/6.3 Nov 19, 2025
5 checks passed
@hamishknight hamishknight deleted the binding-fixes-6.3 branch November 19, 2025 19:23
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 6.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants