@@ -1562,6 +1562,15 @@ end
15621562@test arraysize_tfunc (Vector, Float64) === Union{}
15631563@test arraysize_tfunc (String, Int) === Union{}
15641564
1565+ let tuple_tfunc
1566+ function tuple_tfunc (@nospecialize xs... )
1567+ return Core. Compiler. tuple_tfunc (Any[xs... ])
1568+ end
1569+ @test Core. Compiler. widenconst (tuple_tfunc (Type{Int})) === Tuple{DataType}
1570+ # https://github.com/JuliaLang/julia/issues/44705
1571+ @test tuple_tfunc (Union{Type{Int32},Type{Int64}}) === Tuple{Type}
1572+ end
1573+
15651574function f23024 (:: Type{T} , :: Int ) where T
15661575 1 + 1
15671576end
@@ -2082,7 +2091,7 @@ let M = Module()
20822091 obj = $ (Expr (:new , M. BePartialStruct, 42 , :cond ))
20832092 r1 = getfield (obj, :cond ) ? 0 : a # r1::Union{Nothing,Int}, not r1::Int (because PartialStruct doesn't wrap Conditional)
20842093 a = $ (gensym (:anyvar )):: Any
2085- r2 = getfield (obj, :cond ) ? a : nothing # r2::Any, not r2::Const(nothing) (we don't need to worry about constrait invalidation here)
2094+ r2 = getfield (obj, :cond ) ? a : nothing # r2::Any, not r2::Const(nothing) (we don't need to worry about constraint invalidation here)
20862095 return r1, r2 # ::Tuple{Union{Nothing,Int},Any}
20872096 end |> only
20882097 end
0 commit comments