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

New known problem: refine bound vars with guards #520

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

erszcz
Copy link
Collaborator

@erszcz erszcz commented Mar 7, 2023

This defines a known problem for one of the type check errors we discussed in #512 (comment).

In general, due to #512 there are many more union types being passed around in code, which leads to more places where we have to manually assert which union member we're dealing with. I think using guards more extensively would:

This PR defines just one known problem because so far I only managed to isolate one from #512 changes, but I remember there were more cases like this. Not all are equally easy to reproduce, i.e. sometimes it's not obvious why Gradualizer can't tell which union member it's dealing with. This is connected with how we represent gradualizer_type:abstract_type().

@erszcz erszcz requested a review from zuiderkwast March 7, 2023 13:57
@erszcz erszcz requested a review from josefs March 16, 2023 21:34
@erszcz
Copy link
Collaborator Author

erszcz commented Mar 16, 2023

I see no veto, so I'm merging this. Let me know, please, if you have any comments.

@erszcz erszcz merged commit 0061fe9 into josefs:master Mar 16, 2023
@erszcz erszcz deleted the new-goal-refine-vars-with-guards branch March 16, 2023 21:36
Copy link
Collaborator

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

LGTM

I don't always check messages during the evening/night. :D

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