Skip to content

Commit

Permalink
inference: handle LimitedAccuracy in handle_global_assignment! (#…
Browse files Browse the repository at this point in the history
…54130)

`abstract_eval_statement` may return `LimitedAccuracy` so we need to
handle it before applying `widenconst`.

- fixes #54125
  • Loading branch information
aviatesk committed Apr 19, 2024
1 parent 30c6e25 commit 814a04a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions base/compiler/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2812,7 +2812,7 @@ end

function handle_global_assignment!(interp::AbstractInterpreter, frame::InferenceState, lhs::GlobalRef, @nospecialize(newty))
effect_free = ALWAYS_FALSE
nothrow = global_assignment_nothrow(lhs.mod, lhs.name, newty)
nothrow = global_assignment_nothrow(lhs.mod, lhs.name, ignorelimited(newty))
inaccessiblememonly = ALWAYS_FALSE
if !nothrow
sub_curr_ssaflag!(frame, IR_FLAG_NOTHROW)
Expand Down Expand Up @@ -3017,7 +3017,6 @@ end
return BasicStmtChange(nothing, rt, exct)
end
changes = nothing
stmt = stmt::Expr
hd = stmt.head
if hd === :(=)
(; rt, exct) = abstract_eval_statement(interp, stmt.args[2], pc_vartable, frame)
Expand Down

0 comments on commit 814a04a

Please sign in to comment.