Skip to content

[5.6][SE-0335] Introduce existential any #40505

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 16 commits into from
Dec 11, 2021

Conversation

hborla
Copy link
Member

@hborla hborla commented Dec 10, 2021

Cherry pick of #40282


Implementation for SE-0335 Introduce existential any.

The feature is currently behind the frontend flag -enable-explicit-existential-types.

Resolves: rdar://86032280

@hborla
Copy link
Member Author

hborla commented Dec 10, 2021

@swift-ci please test

@hborla hborla requested a review from slavapestov December 10, 2021 17:02
@hborla hborla force-pushed the 5.6-existential-any branch from c68c012 to 289df4d Compare December 10, 2021 17:03
@hborla
Copy link
Member Author

hborla commented Dec 10, 2021

@swift-ci please test

@hborla hborla added the r5.6 label Dec 10, 2021
The new type, called ExistentialType, is not yet used in type resolution.
Later, existential types written with `any` will resolve to this type, and
bare protocol names will resolve to this type depending on context.
explicit existential types are enabled.

Note that existential metatypes still resolve to ExistentialMetatypeType,
but later this type can be replaced with ExistentialType(MetatypeType).
…kUnsupportedProtocolType()"

This reverts commit 15f88e9.
flip the return value in the implementation accordingly.
requirements to be spelled with 'any' when explicit existential
types are enabled.
…lType

when explicit existentials are enabled.
@hborla hborla force-pushed the 5.6-existential-any branch from 289df4d to 8e28817 Compare December 10, 2021 20:08
@hborla
Copy link
Member Author

hborla commented Dec 10, 2021

@swift-ci please test

@hborla hborla merged commit ba366e8 into swiftlang:release/5.6 Dec 11, 2021
@hborla hborla deleted the 5.6-existential-any branch December 11, 2021 01:10
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.6 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants