-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
avoid excessive renaming in subtype of intersection result #39623
Conversation
Example query:
|
566f8f6
to
9eca026
Compare
Ok, this got a bit interesting. To fix one test failure, I needed to make
IOW, when the unionall variables inside |
9eca026
to
9c68488
Compare
…#39623) fixes JuliaLang#39505, fixes JuliaLang#39394 do fewer subtype checks in `jl_type_intersection2`
…#39623) fixes JuliaLang#39505, fixes JuliaLang#39394 do fewer subtype checks in `jl_type_intersection2`
In computing
typeintersect(A, B) <: A
, the intersection result would tend to share typevars withA
, causing subtyping to do lots of renaming. Luckily it turns out we can avoid that just by doing more renaming in the intersection result beforehand.fixes #39505, fixes #39394