Skip to content

[Parse/Sema] Diagnose invalid attributes for ParamDecl and GenericTypeParamDecl #17852

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 12, 2018

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jul 10, 2018

Previously, invalid attributes were silently accepted and ignored.

https://bugs.swift.org/browse/SR-8202

rintaro added 2 commits July 10, 2018 20:29
Previously, invalid attributes were silently accepted and ignored.

https://bugs.swift.org/browse/SR-8202
Previously, invalid attributes were silently accepted and ignored.

https://bugs.swift.org/browse/SR-8202
@rintaro
Copy link
Member Author

rintaro commented Jul 10, 2018

@DougGregor @jrose-apple Could you take a look?

@DougGregor @available at generic parameters is really supported and actually works?

class B<@available(*, unavailable, renamed: "U") T> {}
extension B where T: Equatable { }

This can be compiled, but I don't think it should be.
Language Reference does not allow them.

@rintaro
Copy link
Member Author

rintaro commented Jul 10, 2018

@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Jul 10, 2018

@swift-ci Please smoke test Linux

Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doug's out on vacation. I agree that generic parameters should not support @available, though. They really have to be as available as the base type, at least today.

We will want to do a source compat run before merging this.

@rintaro
Copy link
Member Author

rintaro commented Jul 10, 2018

@swift-ci Please Test Source Compatibility

@jrose-apple
Copy link
Contributor

Linux issues have been fixed.

@swift-ci Please smoke test Linux

@rintaro
Copy link
Member Author

rintaro commented Jul 11, 2018

@swift-ci Please test source compatibility

@rintaro
Copy link
Member Author

rintaro commented Jul 11, 2018

@swift-ci Please smoke test Linux

@rintaro
Copy link
Member Author

rintaro commented Jul 11, 2018

@swift-ci Please test source compatibility

@rintaro
Copy link
Member Author

rintaro commented Jul 11, 2018

holding off until source-combat-suite become healthy.

@rintaro
Copy link
Member Author

rintaro commented Jul 12, 2018

@swift-ci Please test source compatibility

@rintaro rintaro merged commit 274114d into swiftlang:master Jul 12, 2018
@rintaro rintaro deleted the parse-attr-invalid-sr8202 branch July 12, 2018 05:13
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