Skip to content

Commit f8b4b79

Browse files
authored
inference: handle LimitedAccuracy in handle_global_assignment! (#54130)
`abstract_eval_statement` may return `LimitedAccuracy` so we need to handle it before applying `widenconst`. - fixes #54125
1 parent a67661e commit f8b4b79

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

base/compiler/abstractinterpretation.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2845,7 +2845,7 @@ end
28452845

28462846
function handle_global_assignment!(interp::AbstractInterpreter, frame::InferenceState, lhs::GlobalRef, @nospecialize(newty))
28472847
effect_free = ALWAYS_FALSE
2848-
nothrow = global_assignment_nothrow(lhs.mod, lhs.name, newty)
2848+
nothrow = global_assignment_nothrow(lhs.mod, lhs.name, ignorelimited(newty))
28492849
inaccessiblememonly = ALWAYS_FALSE
28502850
if !nothrow
28512851
sub_curr_ssaflag!(frame, IR_FLAG_NOTHROW)
@@ -3050,7 +3050,6 @@ end
30503050
return BasicStmtChange(nothing, rt, exct)
30513051
end
30523052
changes = nothing
3053-
stmt = stmt::Expr
30543053
hd = stmt.head
30553054
if hd === :(=)
30563055
(; rt, exct) = abstract_eval_statement(interp, stmt.args[2], pc_vartable, frame)

0 commit comments

Comments
 (0)