@@ -1043,11 +1043,7 @@ function test_intersection()
10431043 Type{Tuple{Int,T}} where T<: Integer )
10441044 @testintersect (Type{<: Tuple{Any,Vararg{Any}} },
10451045 Type{Tuple{Vararg{Int,N}}} where N,
1046- ! Union{})
1047-
1048- @test typeintersect (Type{<: Tuple{Any,Vararg{Any}} }, Type{Tuple{Vararg{Int,N}}} where N) != Type{Tuple{Int,Vararg{Int}}}
1049- @test_broken typeintersect (Type{<: Tuple{Any,Vararg{Any}} }, Type{Tuple{Vararg{Int,N}}} where N) == Type{Tuple{Int,Vararg{Int,N}}} where N
1050- @test_broken typeintersect (Type{<: Tuple{Any,Vararg{Any}} }, Type{Tuple{Vararg{Int,N}}} where N) != Type{<: Tuple{Int,Vararg{Int}} }
1046+ Type{Tuple{Int,Vararg{Int,N}}} where N)
10511047
10521048 @testintersect (Type{<: Array },
10531049 Type{AbstractArray{T}} where T,
@@ -2206,23 +2202,19 @@ let A = Pair{NTuple{N, Int}, NTuple{N, Int}} where N,
22062202 Bs = (Pair{<: Tuple{Int, Vararg{Int}} , <: Tuple{Int, Int, Vararg{Int}} },
22072203 Pair{Tuple{Int, Vararg{Int,N1}}, Tuple{Int, Int, Vararg{Int,N2}}} where {N1,N2},
22082204 Pair{<: Tuple{Int, Vararg{Int,N}} where {N}, <: Tuple{Int, Int, Vararg{Int,N}} where {N}})
2209- Cerr = Pair{Tuple{Int, Vararg{Int, N}}, Tuple{Int, Int, Vararg{Int, N}}} where {N}
2210- for B in Bs
2211- C = typeintersect (A, B)
2212- @test C == typeintersect (B, A) != Union{}
2213- @test C != Cerr
2214- @test_broken C != B
2205+ Cs = (Bs[2 ], Bs[2 ], Bs[3 ])
2206+ for (B, C) in zip (Bs, Cs)
2207+ # TODO : The ideal result is Pair{Tuple{Int, Int, Vararg{Int, N}}, Tuple{Int, Int, Vararg{Int, N}}} where {N}
2208+ @testintersect (A, B, C)
22152209 end
22162210end
22172211
22182212# Example from pr#39098
22192213@testintersect (NTuple, Tuple{Any,Vararg}, Tuple{T, Vararg{T}} where {T})
22202214
2221- let S = Val{T} where T<: Tuple{Tuple{Any, Vararg{Any}}}
2222- T = Val{Tuple{Tuple{Vararg{Any, N}}}} where {N}
2223- @testintersect (S, T, ! Union{})
2224- @test_broken typeintersect (S, T) != Val{Tuple{Tuple{Any, Vararg{Any}}}}
2225- end
2215+ @testintersect (Val{T} where T<: Tuple{Tuple{Any, Vararg{Any}}} ,
2216+ Val{Tuple{Tuple{Vararg{Any, N}}}} where {N},
2217+ Val{Tuple{Tuple{Any, Vararg{Any, N}}}} where {N})
22262218
22272219let A = Pair{NTuple{N, Int}, Val{N}} where N,
22282220 Bs = (Pair{<: Tuple{Int, Vararg{Int}} , <: Val },
0 commit comments