-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Frontend][Parse] Parse new named opaque return type syntax #38041
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
[Frontend][Parse] Parse new named opaque return type syntax #38041
Conversation
In order to put constraints on opaque types in function returns, we want to support naming them like 'func f() -> <T> T { }'. This commit parses that syntax into the new `OpaqueReturnParameteriedTypeRepr`. This is hidden behind the new flag --enable-experimental-opaque-return-types.
@swift-ci please test |
Build failed |
Build failed |
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 like a great start!
- Allow named opaque types in typed patterns and subscripts - Fix inheritance clause printing for `GenericParamList` - clang-format changes from previous commit on this branch
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 ready to merge, except for the var/subscript decl tests I mentioned.
@swift-ci please smoke test |
First commit in the process of implementing the proposal for named opaque return types and associated 'where' clause support. See discussion here: https://forums.swift.org/t/improving-the-ui-of-generics/22814.