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

Hang in subtyping #39967

Closed
KristofferC opened this issue Mar 9, 2021 · 1 comment · Fixed by #48534
Closed

Hang in subtyping #39967

KristofferC opened this issue Mar 9, 2021 · 1 comment · Fixed by #48534
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch

Comments

@KristofferC
Copy link
Member

This is reduced (by @maleadt) from some other code and causes a hang in subtyping:

struct d{e,f} <: AbstractArray{e,f} end
a = Tuple{b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b, b} where b<:Union{d, d{b}} where b
c = Tuple{d, d, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray, AbstractArray}
a <: c
@KristofferC KristofferC added bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch labels Mar 9, 2021
@JeffBezanson JeffBezanson self-assigned this Mar 22, 2021
@vtjnash
Copy link
Member

vtjnash commented Mar 29, 2022

related to #22389

N5N3 added a commit to N5N3/julia that referenced this issue Feb 3, 2023
Should improve the performance where `Y` has fixed length.

Fix the example from JuliaLang#39967.
The root cause there is a exponential growth in Left union.
Fortunately, we won't encounter this problem for concrete `X`,
as there's no 0-depth `Union`.
N5N3 added a commit to N5N3/julia that referenced this issue Feb 5, 2023
Should improve the performance where `Y` has fixed length.

Fix the example from JuliaLang#39967.
The root cause there is a exponential growth in Left union.
Fortunately, we won't encounter this problem for concrete `X`,
as there's no 0-depth `Union`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants