From 814a04a4e4fba52f88b035937dcf6e6f25e07d28 Mon Sep 17 00:00:00 2001 From: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> Date: Fri, 19 Apr 2024 08:50:06 +0900 Subject: [PATCH] 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 --- 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 f84a64cf5c05e..b13df848ce605 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -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) @@ -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)