From 1af1580a8d3002145f9fc89ac6161faac554fe85 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki Date: Thu, 18 Apr 2024 19:51:25 +0900 Subject: [PATCH] inference: handle `LimitedAccuracy` in `handle_global_assignment!` `abstract_eval_statement` may return `LimitedAccuracy` so we need to handle it before applying `widenconst`. --- base/compiler/abstractinterpretation.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index d76e64c84aaae..e4c436c94f72e 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -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) @@ -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)