You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> let a = Tuple{T3,Int64,Tuple{T3}} where T3,
b = Tuple{S3,S3,S4} where S4 where S3,
x = Tuple{Int64,Int64,Tuple{Int64}}
typeintersect(a, b) <: a
end
false # subtype is wrong about (Tuple{S3,S3,S4} where S4<:Tuple{Int64} where S3<:Int64) -- possibly a normalization issue?
julia> let a = Tuple{T1,Val{T2},T2} where T2 where T1,
b = Tuple{Float64,S1,S2} where S2 where S1,
x = Tuple{Float64,Val{Int64},Int64}
typeintersect(a, b) <: a
end
false # suboptimal, but valid (type-intersection was over-approximated)
The second example also has the wrong value for x, it should be x = Tuple{Float64,Val{T2},T2} where T2 <: Int. The first example, similarly, may be only correct now because we disallow Union{} being an element. Otherwise this precise intersection gets harder to express, as it should be Tuple{S3, Int64, S4} where {S3<:Int64, S4<:Tuple{S3}}, which excludes Tuple{Union{}, Int64, Tuple{Int64}} from the set of valid intersections in the return value.
In v1.10, before we fixed that, this example violated transitivity:
julia> x <: a
true
julia> x <: b
true
julia> y <: a
true
julia> y <: b
false
julia> y <: x
true
julia> x <: y
true
julia> y <: x
true
from #19998
The text was updated successfully, but these errors were encountered: