-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Inference: more thorough UnionAll
renaming in apply_type_tfunc
#48662
Conversation
Should fix #48631? |
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.
|
@maleadt s original MWE still fails locally for me. At least on macos on the latest master, so not sure if we can close it. |
if contains_is(outervars, tai.var) | ||
ai = rename_unionall(ai) | ||
unw = unwrap_unionall(ai) | ||
break |
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.
break |
?
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.
IIUC, rename_unionall
replaces all typevars in ai
thus there's no need to re-rename?
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.
Ah, okay. That function is a bit awkward then, since it also exists in C without that behavior, and this is the only usage of the function anywhere (including not existing in any tests) from 93a725d
My fault. Looks like one of my local subtype/intersect patch silented the error. Still need some effort to find the remaining issue. |
Should fix the "An unreachable instruction was executed" error in recent PkgEval.
MWE has been added to test.