Skip to content

[5.9] Fix covariant erasure for constrained existential #66017

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

Conversation

angela-laar
Copy link
Contributor

@angela-laar angela-laar commented May 19, 2023

  • Explanation: Opened existentials should be erased to the dependent upper bound
    if the dependent member can be reduced to a concrete type. This
    allows the generic signature to support parameterized protocol types
    and bound generic class types by producing a more specific constraint.
  • Scope: Narrow; effects existential parameterized protocol types
  • Risk: Low, this adds support for opening existentials with parameterized protocol type
  • Reviewers: @xedin
  • Issue: rdar://101343646
  • Original pull request: Fix covariant erasure for constrained existentials #65785

Constrained existentials should be type erased to an upper bound that is dependent on other type parameters.
Opened existentials should be erased to the dependent upper bound
if the dependent member can be reduced to a concrete type. This
allows the generic signature to support parameterized protocol types
and bound generic class types by producing a more specific constraint
instead of just a plain protocol or class.
@angela-laar angela-laar requested a review from a team as a code owner May 19, 2023 07:00
@angela-laar
Copy link
Contributor Author

@swift-ci please test

@angela-laar angela-laar changed the title Fix covariant erasure for constrained existential 5.9 [5.9] Fix covariant erasure for constrained existential May 19, 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.

2 participants