Skip to content

[Type Resolution] Resolve (any P.Type).Type as the metatype of an existential metatype. #42380

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

Conversation

hborla
Copy link
Member

@hborla hborla commented Apr 14, 2022

Until we model ExistentialMetatypeType as ExistentialType(MetatypeType), type resolution needs to look through the instance type repr when resolving a metatype. Otherwise, there's no way to distinguish between P.Type.Type, which is an existential metatype, and (any P.Type).Type, which is the static metatype of an existential metatype.

Resolves: rdar://91784600

existential metatype.

Until we model ExistentialMetatypeType as ExistentialType(MetatypeType),
type resolution needs to look through the instance type repr when
resolving a metatype. Otherwise, there's no way to distinguish between
P.Type.Type, which is an existential metatype, and (any P.Type).Type,
which is the static metatype of an existential metatype.
@hborla hborla requested a review from CodaFi April 14, 2022 23:04
@hborla
Copy link
Member Author

hborla commented Apr 14, 2022

@swift-ci please smoke test

@hborla
Copy link
Member Author

hborla commented Apr 15, 2022

@swift-ci please test Windows

@LucianoPAlmeida
Copy link
Contributor

@swift-ci Please test Windows Platform

@hborla hborla merged commit c36716e into swiftlang:main Apr 15, 2022
@hborla hborla deleted the nested-existential-metatype-resolution branch April 15, 2022 16:45
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.

3 participants