Skip to content

[5.7][CodeCompletion] Update for SE-0345 shorthand optional binding #42224

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

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Apr 6, 2022

Cherry-pick #42145 into release/5.7

  • Explanation: Update for SE-0345 (https://github.com/apple/swift-evolution/blob/main/proposals/0345-if-let-shorthand.md) which introduces a shorthand syntax for optional binding in control statement conditions. Previously code completion didn't suggest anything after if let because that is a position of name declaration. But with this change, it suggest visible Optional values after if let/var to help typing the shorthand syntax.
  • Scope: Code completion in statement conditions
  • Issues: rdar://90399603
  • Risk: Low. This is a new feature, but uses well-established method of completion mechanism
  • Testing: Added regression test cases
  • Reviewer: Alex Hoppen (@ahoppen)

Suggest visible optional values after 'if let'.

rdar://90399603
(cherry picked from commit bcc003b)
@rintaro rintaro requested a review from a team as a code owner April 6, 2022 21:27
@rintaro rintaro requested a review from ahoppen April 6, 2022 21:27
@rintaro
Copy link
Member Author

rintaro commented Apr 6, 2022

@swift-ci Please test

@rintaro rintaro requested a review from airspeedswift April 11, 2022 17:13
@rintaro rintaro merged commit d0691e3 into swiftlang:release/5.7 Apr 12, 2022
@rintaro rintaro deleted the 5.7-ide-completion-rdar90399603 branch April 12, 2022 18:32
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.

2 participants