Skip to content

[ConstraintSystem] Prevent direct supertype binding generation for key path type vars #68137

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

Closed
wants to merge 1 commit into from

Conversation

amritpan
Copy link
Member

@amritpan amritpan commented Aug 25, 2023

These changes prevent supertype binding generation for type variables that represent key path expressions because such types require a fully resolved key path (with root and value).

@amritpan amritpan requested review from hborla and xedin as code owners August 25, 2023 05:26
if (auto simplifiedSuper = checkTypeOfBinding(TypeVar, supertype))
addNewBinding(binding.withType(*simplifiedSuper));
// If this is a type variable representing a key path type,
// try to bind to any direct supertypes.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is the opposite of what the condition does...

@amritpan amritpan changed the title [ConstraintSystem] Generate direct supertypes for key path type vars only [ConstraintSystem] Prevent direct supertype binding generation for key path type vars Aug 25, 2023
@xedin
Copy link
Contributor

xedin commented Oct 7, 2023

Superseded by #69031

@xedin xedin closed this Oct 7, 2023
@amritpan amritpan deleted the kp-supertypes branch October 7, 2023 19:56
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