@@ -2068,14 +2068,18 @@ function widenreturn(@nospecialize(rt), @nospecialize(bestguess), nslots::Int, s
2068
2068
# and is valid and good inter-procedurally
2069
2069
isa (rt, Conditional) && return InterConditional (slot_id (rt. var), rt. vtype, rt. elsetype)
2070
2070
isa (rt, InterConditional) && return rt
2071
+ return widenreturn_noconditional (rt)
2072
+ end
2073
+
2074
+ function widenreturn_noconditional (@nospecialize (rt))
2071
2075
isa (rt, Const) && return rt
2072
2076
isa (rt, Type) && return rt
2073
2077
if isa (rt, PartialStruct)
2074
2078
fields = copy (rt. fields)
2075
2079
local anyrefine = false
2076
2080
for i in 1 : length (fields)
2077
2081
a = fields[i]
2078
- a = isvarargtype (a) ? a : widenreturn (a, bestguess, nslots, slottypes, changes )
2082
+ a = isvarargtype (a) ? a : widenreturn_noconditional ( widenconditional (a) )
2079
2083
if ! anyrefine
2080
2084
# TODO : consider adding && const_prop_profitable(a) here?
2081
2085
anyrefine = has_const_info (a) ||
@@ -2091,6 +2095,7 @@ function widenreturn(@nospecialize(rt), @nospecialize(bestguess), nslots::Int, s
2091
2095
return widenconst (rt)
2092
2096
end
2093
2097
2098
+
2094
2099
function handle_control_backedge! (frame:: InferenceState , from:: Int , to:: Int )
2095
2100
if from > to
2096
2101
if is_effect_overrided (frame, :terminates_globally )
0 commit comments