Skip to content

[5.5][CSBindings] Account for literal bindings when checking "subtype of existential" property #37672

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
Jun 2, 2021

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 27, 2021

Cherry-pick of #37643


  • Explanation:

Fixes a source compatibility regression introduced by incremental
binding inference that results in type-checker rejecting valid code.

It's important to know whether a binding set has all of its bindings
as subtypes of some existential type(s), type variables like that
should be delayed.

Incremental binding inference introduced a bug into computation of
this property by checking only directly inferable bindings, but
it's also important to check that there are no literal requirements
that can produce bindings, because that would mean that type variable
can never be just a subtype of existential type(s).

Resolves: rdar://77570994
(cherry picked from commit cf13e29)

…xistential" property

It's important to know whether a binding set has all of its bindings
as subtypes of some existential type(s), type variables like that
should be delayed.

Incremental binding inference introduced a bug into computation of
this property by checking only directly inferable bindings, but
it's also important to check that there are no literal requirements
that can produce bindings, because that would mean that type variable
can never be just a subtype of existential type(s).

Resolves: rdar://77570994
(cherry picked from commit cf13e29)
@xedin xedin added the r5.5 label May 27, 2021
@xedin xedin requested a review from a team as a code owner May 27, 2021 16:59
@xedin
Copy link
Contributor Author

xedin commented May 27, 2021

@swift-ci please test

@xedin xedin merged commit 353cfce into swiftlang:release/5.5 Jun 2, 2021
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 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 swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants