Skip to content

Existential Types Cannot Satisfy Superclass Bounds #58624

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 1 commit into from
May 3, 2022

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented May 2, 2022

It is not the case that any P satisfies a class bound
even if the existential is a composition with an exact
match to the class bound. The resulting existential box
must be opened as the exact class type before this conversion
can succeed.

This appears to be a regression from Swift 5.1, which was the last
Swift compiler that banned this typing rule.

rdar://92358570

It is not the case that `any P` satisfies a class bound
even if the existential is a composition with an exact
match to the class bound. The resulting existential box
must be opened as the exact class type before this conversion
can succeed.

This appears to be a regression from Swift 5.1, which was the last
Swift compiler that banned this typing rule.

rdar://92358570
@CodaFi CodaFi requested a review from xedin May 2, 2022 23:03
@CodaFi
Copy link
Contributor Author

CodaFi commented May 2, 2022

@swift-ci smoke test

@CodaFi
Copy link
Contributor Author

CodaFi commented May 2, 2022

@swift-ci test source compatibility

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@CodaFi
Copy link
Contributor Author

CodaFi commented May 3, 2022

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.

2 participants