-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[WIP] Fixing an Infinite Loop case in UnmatchedChecker. #4881
Conversation
Excellent catch, thank you for finding a repro. As we privately discussed, this appears to be a problem in expanding the wildcards: there is a line that potentially erases information from candidates, violating the invariant that expanded candidates should always be larger than the original ones. This should essentially require a one-line change in ExpandWildcards (I will let you get to it) |
@MarisaKirisame are you planning to update, or should I make the changes myself? |
I will do it myself. Was hoping mike will try it... |
@MarisaKirisame I hate to be a nuisance, but I wanted to give another reminder so we don't forget to fix this case |
@slyubomirsky @zhiics @junrushao1994 can you guys review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only one minor question.
|
||
|
||
def test_inf_loop_case(): | ||
code = """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be aligned in the raw string? Not sure if it will cause parsing problem.
* save * save * remove * remove cerr
* save * save * remove * remove cerr
* save * save * remove * remove cerr
the below code will cause the unmatched case in type checker to hang. The problem is that the expand function will contract but it shouldnt. Will upload a fix tmr.