Skip to content

Conversation

@hamishknight
Copy link
Contributor

@hamishknight hamishknight commented May 13, 2023

5.9 cherry-pick of #65893

  • Explanation: Fixes an issue where name lookup would not find a binding introduced by an if/switch expression that is used in an assignment.
  • Scope: Affects name lookup of bindings introduced by if/switch expressions used in assignments (note that if/switch expressions in bindings are unaffected).
  • Issue: rdar://109192116
  • Risk: Low
  • Testing: Added tests to the test suite
  • Reviewer: Pavel Yaskevich

Previously we could miss the scopes present in
if/switch expressions if they were nested in
another expression, such as an AssignExpr. Fix
the logic such that we properly walk over a given
expression looking for if/switch scopes, the same
as what we do for closures.

rdar://109192116
@hamishknight hamishknight added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels May 13, 2023
@hamishknight hamishknight requested a review from a team as a code owner May 13, 2023 10:36
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight hamishknight merged commit 6be7085 into swiftlang:release/5.9 May 16, 2023
@hamishknight hamishknight deleted the scoping-out-5.9 branch May 16, 2023 15:58
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