-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Allow existential parameterized compositions: any P<A> & Q
#76705
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
Allow existential parameterized compositions: any P<A> & Q
#76705
Conversation
5096fd8
to
4fcf025
Compare
4fcf025
to
c733692
Compare
@swift-ci Please test source compatibility |
@swift-ci Please smoke test |
@swift-ci Please smoke test Linux |
This needs evolution approval, right? EDIT: no, it looks like SE-0353 meant to include this capability |
@slavapestov any ideas when this may be merged in? Thank you! |
c733692
to
4f2d69c
Compare
4f2d69c
to
6241afa
Compare
@swift-ci Please smoke test |
@swift-ci Please test source compatibility |
@swift-ci Please smoke test |
Pull Request is not mergeable
1fa9afc
to
7c4564c
Compare
@swift-ci Please smoke test |
We originally didn't implement support for compositions of the form
any P<A> & Q
, but users discovered that we would accept this if you defined a typealias, liketypealias Alias = P<A> & Q
and then wroteany Alias
. However, of course this didn't alway behave correctly, hence the bug reports.Over time, I fixed most of the underlying problems that prevented this from working. The last missing piece was the ASTDemangler support for such types. Now that this is place, I think it's safe to lift this restriction.