Skip to content
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

Valid redefinition rework #11657

Merged
merged 3 commits into from
May 6, 2024
Merged

Valid redefinition rework #11657

merged 3 commits into from
May 6, 2024

Conversation

Simn
Copy link
Member

@Simn Simn commented May 6, 2024

This changes how valid_redefinition deals with type parameters by introducing type_param_mode to unification and using a special TpDefinition mode. When encountering a type parameter to type parameter assignment in that mode, we pair the two up and admit the unification. Once we're done with that, we check that the constraints.

Constraint checks now use unification instead of type equality, which means that they respect variance. See the tests for examples, I hope I got everything right.

This shouldn't outright break anything but there's a chance we're adding type holes.

Closes #11411.

@Simn
Copy link
Member Author

Simn commented May 6, 2024

There's a sequel commit that deals with #11624, but that one will break some code by design, so I'd like to handle it separately.

@Simn Simn merged commit 49fe159 into development May 6, 2024
99 checks passed
@Simn Simn deleted the valid_redefinition_rework branch May 6, 2024 07:14
@skial skial mentioned this pull request May 9, 2024
1 task
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.

Field type parameters vs. valid_redefinition
1 participant