Skip to content

[4.2] [codecomplete] Add completion of if after else #17883

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 2 commits into from
Jul 11, 2018

Conversation

benlangmuir
Copy link
Contributor

  • Explanation: At some point we stopped completing keywords after else in an if statement. The fix is to add back the completion of if, which is the only valid continuation other than a brace.
  • Scope: Affects code-completion for if-else statements.
  • Issue: rdar://37467474
  • Risk: Low; just adds an additional code-completion callback from the parser that adds the keyword completion.
  • Testing: Regression tests added.
  • Reviewed by: @nkcsgexi

@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@benlangmuir
Copy link
Contributor Author

@swift-ci please nominate

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - b2dc9235da5a853082ba825b8261c32af6c1024b

At some point we stopped completing keywords after `else` in an if
statement. Bring back the completion of `if`, which is the only valid
continuation other than a brace.

rdar://37467474
@benlangmuir
Copy link
Contributor Author

Change: on swift-4.2 there was one extra call to AddKeyword that needed to be changed to AddStmtKeyword.

@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - b2dc9235da5a853082ba825b8261c32af6c1024b

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - b2dc9235da5a853082ba825b8261c32af6c1024b

@benlangmuir benlangmuir merged commit 2ff55a8 into swiftlang:swift-4.2-branch Jul 11, 2018
@benlangmuir benlangmuir deleted the cc-if-else-if-42 branch July 11, 2018 20:51
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