Closed
Description
openedon Mar 23, 2022
I guess this issue should be raised before, but I couldn't find an issue that discusses this.
When working on #44512 (in particularity this issue), I found the following isa
check doesn't work as I expected:
julia> Type{Int} <: DataType
true
julia> Int isa Type{Int}
true
julia> (Int,) isa Tuple{DataType} # expected
true
julia> (Int,) isa Tuple{Type{Int}} # I expected this to return `true`
false
So in essence Tuple
-type whose parameter contains Type
-type doesn't seem to follow the covariant rule.
This issue leads to the ERROR: fatal error in type inference (type bound)
error in #44512 when we try to union-split Base.indexed_iterate(::Union{Tuple{Nothing, Nothing, Nothing}, Tuple{Any, Union{Type{AbstractContinuousSystem}, Type{AbstractDiscreteSystem}}, Any}}, ...)
callsite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment