Skip to content

[Parser] Fix-it for declaration attributes being applied to parameter types (SR-215) #1088

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
Jan 26, 2016

Conversation

SquaredTiki
Copy link
Contributor

Original PR #673 but reverted due to test failures. Test failures should be fixed in this PR. Original description as follows:

As described in SR-215, previously the fix-it was suggesting that declaration attributes applied to parameter types be moved to before the function func declaration itself.

This pull request fixes this so that it is instead moved to before the parameter name.

Checks decl options to ensure it can be applied to a parameter & handles no escape special case as it's not a type attribute unless in SIL mode
@gribozavr
Copy link
Contributor

Did you mean to also add tests from the old PR?

@SquaredTiki
Copy link
Contributor Author

@gribozavr Sorry about that, should be sorted now.

@gribozavr
Copy link
Contributor

Tests pass now, merging.

gribozavr added a commit that referenced this pull request Jan 26, 2016
[Parser] Fix-it for declaration attributes being applied to parameter types (SR-215)
@gribozavr gribozavr merged commit 2fdc875 into swiftlang:master Jan 26, 2016
@gribozavr
Copy link
Contributor

Actually, no -- this caused a build failure:

swift/lib/Parse/ParsePattern.cpp:271:46: error: use of undeclared identifier 'declKind'
                && DeclAttribute::getOptions(declKind) & OnParam) {

Reverting.

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