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

Add a fast-path for #49857 #49878

Merged
merged 1 commit into from
May 20, 2023
Merged

Add a fast-path for #49857 #49878

merged 1 commit into from
May 20, 2023

Conversation

N5N3
Copy link
Member

@N5N3 N5N3 commented May 18, 2023

The union explosion is caused by Type{Vector{Union{....}} <: Type{Array{T}} where {T}

280f999 only fixes for Union{......} without free Typevar.

This PR makes sure the remaining get fixed.

The union explosion is caused by the following MWE:
Type{Vector{Union{....}} <: Type{Array{T}} where {T}

280f999 only fixes for `Union{......}` without free `Typevar`. This fast-path makes sure the remaining get fixed.
@N5N3 N5N3 added the domain:types and dispatch Types, subtyping and method dispatch label May 18, 2023
@N5N3 N5N3 requested a review from vtjnash May 18, 2023 14:23
@kpamnany
Copy link
Contributor

This also seems to fix #49857 if backported to 1.9.0 with the addition of df377ad9d4dd18018bc212335a52856d2e53651b (part of which appears to already be in 1.9.0 😖).

@N5N3: should I use this fix instead of #49875?

@N5N3
Copy link
Member Author

N5N3 commented May 18, 2023

@kpamnany I think #49875 is much safer for 1.9.
At least it would not add new freezing which works on 1.8.
I believe there are many more patterns which might cause union explosion, and it's hard to figure all of them out.

@vtjnash vtjnash merged commit 5dafc84 into JuliaLang:master May 20, 2023
2 checks passed
@N5N3 N5N3 deleted the subtype-fix branch May 21, 2023 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants