Skip to content

[Parser] Preserve empty getter functions for indentation (3.0) #4592

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 1 commit into from
Sep 2, 2016
Merged

[Parser] Preserve empty getter functions for indentation (3.0) #4592

merged 1 commit into from
Sep 2, 2016

Conversation

nkcsgexi
Copy link
Contributor

@nkcsgexi nkcsgexi commented Sep 1, 2016

[Parser] Preserve empty getter functions to make sure indentation inside its body still works. rdar://28049927

Explanation: Indentation is unavailable when users hit enter inside an empty block of getter function. The root cause is that parser dropped empty getter functions, leading SourceKit to believe there are nothing interesting at the indentation position. This patch starts to preserve empty getter functions.

Scope of issue: Low

Risk: Low

Reviewed By: Argyrios

Radar: rdar://28049927

Resolves SR-NNNN.

* [Parser] Preserve empty getter functions to make sure indentation inside its body still works. rdar://28049927

* Using the consistent identifier even though they are identical.
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented Sep 1, 2016

@swift-ci Please test OS X platform

@nkcsgexi nkcsgexi added this to the Swift 3.0 milestone Sep 1, 2016
@akyrtzi
Copy link
Contributor

akyrtzi commented Sep 1, 2016

LGTM.

@nkcsgexi nkcsgexi merged commit 1fbb705 into swiftlang:swift-3.0-branch Sep 2, 2016
@nkcsgexi nkcsgexi deleted the indentation-3.0 branch September 2, 2016 02:34
aaditya-chandrasekhar pushed a commit to val-verde/swift that referenced this pull request Sep 30, 2022
[pull] swiftwasm-release/5.7 from release/5.7
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.

3 participants