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

Handle Vararg in PartialStruct fields in lattice ⊑ #46515

Merged
merged 1 commit into from
Aug 28, 2022
Merged

Conversation

Keno
Copy link
Member

@Keno Keno commented Aug 28, 2022

This was an existing todo. While we're at it, also explicitly
check the remaining cases where lattice elements survived
all the way to the conservative fallback and remove it in
preparation for some refactoring here.

This was an existing todo. While we're at it, also explicitly
check the remaining cases where lattice elements survived
all the way to the conservative fallback and remove it in
preparation for some refactoring here.
@Keno Keno merged commit 5316549 into master Aug 28, 2022
@Keno Keno deleted the kf/vararglattice branch August 28, 2022 21:02
Copy link
Member

@aviatesk aviatesk left a comment

Choose a reason for hiding this comment

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

LGTM.

return a <: b
else # handle this conservatively in the remaining cases
elseif isa(a, PartialTypeVar)
return b === TypeVar || a === b
Copy link
Member

Choose a reason for hiding this comment

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

Is it legal to compare these with ===? That is not a lattice-preserving operation for the TypeVar object inside.

Copy link
Member Author

Choose a reason for hiding this comment

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

That is unchanged in this PR, the condition just moved around. I agree that it might not be sound though.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, gotcha. It was hard to see that in the default unified diff; easier in the split diff.

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.

3 participants