Skip to content

Commit 814a04a

Browse files
committed
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 30c6e25 commit 814a04a

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
@@ -2812,7 +2812,7 @@ end
28122812

28132813
function handle_global_assignment!(interp::AbstractInterpreter, frame::InferenceState, lhs::GlobalRef, @nospecialize(newty))
28142814
effect_free = ALWAYS_FALSE
2815-
nothrow = global_assignment_nothrow(lhs.mod, lhs.name, newty)
2815+
nothrow = global_assignment_nothrow(lhs.mod, lhs.name, ignorelimited(newty))
28162816
inaccessiblememonly = ALWAYS_FALSE
28172817
if !nothrow
28182818
sub_curr_ssaflag!(frame, IR_FLAG_NOTHROW)
@@ -3017,7 +3017,6 @@ end
30173017
return BasicStmtChange(nothing, rt, exct)
30183018
end
30193019
changes = nothing
3020-
stmt = stmt::Expr
30213020
hd = stmt.head
30223021
if hd === :(=)
30233022
(; rt, exct) = abstract_eval_statement(interp, stmt.args[2], pc_vartable, frame)

0 commit comments

Comments
 (0)