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

Don't relax type when doing an instantiateL during subtyping #5133

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

dolio
Copy link
Contributor

@dolio dolio commented Jun 25, 2024

This is the case of a < T for some structured T. By relaxing, we are actually allowing a to be a supertype of T as far as abilities go, which is not correct. Seems like it was just erroneously mirrored from the opposite case, where T < a means that a could be more general than T.

Fixes #5129 and #3513.

This is the case of `a < T` for some structured T. By relaxing, we are
actually allowing `a` to be a _supertype_ of T as far as abilities go,
which is not correct. Seems like it was just erroneously mirrored from
the opposite case.
Copy link
Contributor

@ceedubs ceedubs left a comment

Choose a reason for hiding this comment

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

Nice thanks!

@aryairani aryairani merged commit 1e72750 into trunk Jun 25, 2024
35 checks passed
@aryairani aryairani deleted the fix/5129 branch June 25, 2024 20:23
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.

type checker not catching disallowed ability
3 participants