Skip to content

[5.1][CodeCompletion] Don't attach attr to decl if it's not on the same line #25707

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

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jun 24, 2019

Cherry-pick of #25654 to swift-5.1-branch reviewed by @benlangmuir
rdar://problem/50441643

rintaro added 3 commits June 24, 2019 09:33
```
@#^COMPLETE^#

public func something() {}
```
In this case, we can't say the user is adding attribute to the func or
starting a new declaration. So if there're one or more blank lines after the
completion, suggest context free attribute list.

rdar://problem/50441643
(cherry picked from commit 09ca68e)
It's common to have decls on consecutive lines. Better to show too many
attributes than too few.

(cherry picked from commit bb3edd5)
@rintaro
Copy link
Member Author

rintaro commented Jun 24, 2019

@swift-ci Please test

@rintaro rintaro changed the title [5.1][CodeCompletion] Don't attach attr to decl if blank line exists [5.1][CodeCompletion] Don't attach attr to decl if it's not on the same line Jun 24, 2019
@rintaro rintaro merged commit ae0aeaf into swiftlang:swift-5.1-branch Jun 24, 2019
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.

1 participant