@@ -1632,3 +1632,22 @@ end
16321632@testintersect (Tuple{Type{T} where T<: (S32488{Tuple{_A}, Int64, 1, _A} where _A) , Tuple{Vararg{Int64, D}} where D},
16331633 Tuple{Type{S32488{S, T, N, L}}, Tuple{Vararg{T, L}}} where L where N where T where S,
16341634 Tuple{Type{S32488{Tuple{L},Int64,1 ,L}},Tuple{Vararg{Int64,L}}} where L)
1635+
1636+ # issue #32703
1637+ struct Str{C} <: AbstractString
1638+ end
1639+ struct CSE{X}
1640+ end
1641+ const UTF16CSE = CSE{1 }
1642+ const UTF16Str = Str{UTF16CSE}
1643+ const ASCIIStr = Str{CSE{2 }}
1644+ c32703 (:: Type{<:Str{UTF16CSE}} , str:: AbstractString ) = 42
1645+ c32703 (:: Type{<:Str{C}} , str:: Str{C} ) where {C<: CSE } = str
1646+
1647+ @testintersect (Tuple{Type{UTF16Str},ASCIIStr},
1648+ Tuple{Type{<: Str{C} }, Str{C}} where {C<: CSE },
1649+ Union{})
1650+ @test c32703 (UTF16Str, ASCIIStr ()) == 42
1651+ @test_broken typeintersect (Tuple{Vector{Vector{Float32}},Matrix,Matrix},
1652+ Tuple{Vector{V},Matrix{Int},Matrix{S}} where {S, V<: AbstractVector{S} }) ==
1653+ Tuple{Array{Array{Float32,1 },1 },Array{Int,2 },Array{Float32,2 }}
0 commit comments