-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[AST] Remove ParameterTypeFlags from ParenType and TupleType #60263
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I only have one reservation and it's about ParameterFlagHandling
and letting callers get away with dropping flags.
c7b6f00
to
dab78c6
Compare
@swift-ci please test |
@swift-ci please test source compatibility |
GitHub got the wrong timestamps for the force push, correct diff is https://github.com/apple/swift/compare/dab78c634d2adfc350f8f5085fce358040a4d2c8..69f59bbc6c8b2201b64b0100a8a62bffb79775e2 |
Previously we relied on `TupleTypeElt::getType` returning an `InOutType` to fail the tuple type matching logic. Instead, add logic to reject any inout arguments up-front with a more specific diagnostic. Also, while we're here, strip the `_const` parameter flag, as it's not something that needs to be considered for tuple construction.
Callers may either assert that the parameter flags are empty, or ask for them to be dropped.
SILGen shouldn't care whether or not a self parameter is wrapped in a paren with ownership.
The last clients that relied on stashing parameter type flags on these types are now gone.
69f59bb
to
e0d8e4f
Compare
@swift-ci please test |
@hamishknight Looks great! |
🚢 |
The last clients that relied on stashing parameter type flags on these types are now gone.