Skip to content

Commit

Permalink
Correct nothrow modeling of get_binding_type
Browse files Browse the repository at this point in the history
As pointed out in #56299 (comment),
although the bug predates that PR.
  • Loading branch information
Keno committed Nov 4, 2024
1 parent 0249feb commit 2fd754f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/compiler/tfuncs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 2fd754f

Please sign in to comment.