From 2964a3d5e39a00bd51967c8058161f724f133d35 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Thu, 21 Nov 2024 18:47:05 +0900 Subject: [PATCH] use direct `Union` application instead of `tmerge` --- Compiler/src/tfuncs.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Compiler/src/tfuncs.jl b/Compiler/src/tfuncs.jl index 8f7c7ed85e66f..af8863c1b3a3a 100644 --- a/Compiler/src/tfuncs.jl +++ b/Compiler/src/tfuncs.jl @@ -1773,10 +1773,10 @@ function apply_type_tfunc(𝕃::AbstractLattice, argtypes::Vector{Any}; return allconst ? Const(ty) : Type{ty} end if 1 < unionsplitcost(𝕃, argtypes) ≤ max_union_splitting - ⊔ = join(𝕃) rt = Bottom for split_argtypes = switchtupleunion(𝕃, argtypes) - rt = rt ⊔ _apply_type_tfunc(𝕃, headtype, split_argtypes) + this_rt = widenconst(_apply_type_tfunc(𝕃, headtype, split_argtypes)) + rt = Union{rt, this_rt} end return rt end