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 18, 2024
1 parent a67661e commit f8b4b79
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions base/compiler/abstractinterpretation.jl
Expand Up @@ -2845,7 +2845,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 @@ -3050,7 +3050,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 f8b4b79

Please sign in to comment.