Skip to content

Conservative Dynamic Casts to/from Parameterized Protocols #41926

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
Mar 21, 2022

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Mar 21, 2022

Update cast feasibility analysis to take parameterized protocols into account. The cast classifier was used to being able to essentially just run conformsToProtocol on the existential type, but for parameterized protocol types this will ignore the extra requirements imposed by the argument clause. For now, route everything through the runtime.

The predicate used here is primitive. A follow-up PR will turn on class-bound existential compositions with parameterized protocol types and revisit it.

Update cast feasibility analysis to take parameterized protocols into account. The cast classifier was used to being able to essentially just run `conformsToProtocol` on the existential type, but for parameterized protocol types this will ignore the extra requirements imposed by the argument clause. For now, route everything through the runtime.
@CodaFi
Copy link
Contributor Author

CodaFi commented Mar 21, 2022

@swift-ci smoke test

@CodaFi CodaFi merged commit 698ff60 into swiftlang:main Mar 21, 2022
@CodaFi CodaFi deleted the caster-oil branch March 21, 2022 20:13
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.

1 participant