From 2fd754f9e2da797a241596557249ed427adf54d2 Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Mon, 4 Nov 2024 01:45:05 +0000 Subject: [PATCH] Correct nothrow modeling of `get_binding_type` As pointed out in https://github.com/JuliaLang/julia/pull/56299#discussion_r1826509185, although the bug predates that PR. --- base/compiler/tfuncs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/compiler/tfuncs.jl b/base/compiler/tfuncs.jl index aaa1354fd5e540..f18bf57397a160 100644 --- a/base/compiler/tfuncs.jl +++ b/base/compiler/tfuncs.jl @@ -2501,7 +2501,7 @@ function builtin_effects(𝕃::AbstractLattice, @nospecialize(f::Builtin), argty elseif f === Core.get_binding_type length(argtypes) == 2 || return EFFECTS_THROWS # Modeled more precisely in abstract_eval_get_binding_type - return Effects(EFFECTS_TOTAL; effect_free=ALWAYS_FALSE) + return Effects(EFFECTS_TOTAL; effect_free=ALWAYS_FALSE, nothrow=get_binding_type_nothrow(argtypes[1], argtypes[2])) elseif f === compilerbarrier length(argtypes) == 2 || return Effects(EFFECTS_THROWS; consistent=ALWAYS_FALSE) setting = argtypes[1]