Skip to content

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 9, 2022

  • Explanation: Related Identifiers (mostly used for related identifier highlighting and Edit All in Scope in Xcode) did not look through closure captures like [foo] or shorthand if let foo { bindings. This caused Edit All in Scope to only rename variables up to that boundary, but no on the other side, resulting in invalid code.
  • Scope: Edit All in Scope for variables that are used in [foo] closure captures or if let foo {-style bindings.
  • Risk: Low
  • Testing: Added regression tests
  • Issue: rdar://81628899
  • Reviewer: @bnbarham on [SourceKit] In related identes, report underlying var of closure capture and shorthand if let binding #58684

ahoppen added 2 commits May 9, 2022 16:57
…captured variable

Previously, the related idents request wouldn’t look through caputred variables like `[foo]`. Change the logic to consider the captured variable as well as the variable that’s implicitly declared for use inside the closure.

rdar://81628899
@ahoppen ahoppen added the r5.7 label May 9, 2022
@ahoppen ahoppen requested a review from airspeedswift May 9, 2022 15:01
@ahoppen ahoppen requested a review from a team as a code owner May 9, 2022 15:01
@ahoppen
Copy link
Member Author

ahoppen commented May 9, 2022

@swift-ci Please test

@ahoppen ahoppen merged commit 758d7ea into swiftlang:release/5.7 May 13, 2022
@ahoppen ahoppen deleted the pr-5.7/related-idents branch May 13, 2022 16:38
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.7 labels Jan 9, 2023
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.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants