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

StackOverflowError in subtyping due to comparison of TypeVar against Union{} #38279

Closed
vtjnash opened this issue Nov 2, 2020 · 0 comments
Closed
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch

Comments

@vtjnash
Copy link
Member

vtjnash commented Nov 2, 2020

This fails on v1.0 through master plus #38245 with a StackOverflow due to an infinite loop when subtyping attempts to test whether Union{} is a subtype of T<:Real.

T = Tuple{<:Array{T, N}, Val{T}} where {T<:Real, N}
S = Tuple{<:Array{T, N}, Val{<:AbstractString}}  where {T<:Real, N}
@test typeintersect(T, S) == Tuple{<:Array{Union{}, N}, Val{Union{}}} where N
@vtjnash vtjnash added bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch labels Nov 2, 2020
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

No branches or pull requests

2 participants