File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1558,6 +1558,8 @@ function tuple_tfunc(argtypes::Vector{Any})
15581558 else
15591559 params[i] = Type
15601560 end
1561+ elseif x === DataType || x === UnionAll
1562+ params[i] = x
15611563 elseif ! isvarargtype (x) && hasintersect (x, Type)
15621564 params[i] = Union{x, Type}
15631565 else
Original file line number Diff line number Diff line change @@ -1569,6 +1569,8 @@ let tuple_tfunc
15691569 @test Core. Compiler. widenconst (tuple_tfunc (Type{Int})) === Tuple{DataType}
15701570 # https://github.com/JuliaLang/julia/issues/44705
15711571 @test tuple_tfunc (Union{Type{Int32},Type{Int64}}) === Tuple{Type}
1572+ @test tuple_tfunc (DataType) === Tuple{DataType}
1573+ @test tuple_tfunc (UnionAll) === Tuple{UnionAll}
15721574end
15731575
15741576function f23024 (:: Type{T} , :: Int ) where T
You can’t perform that action at this time.
0 commit comments