Skip to content

Commit

Permalink
[compiler] Fix effects of supertype abstract interpretation (#48566)
Browse files Browse the repository at this point in the history
This `abstract_call_known` recursion inserted `EFFECTS_TOTAL` which is
incorrect because `<:` and `>:` can throw if the arguments are not
types.

(cherry picked from commit 0ab6e2f)
  • Loading branch information
staticfloat authored and KristofferC committed Feb 7, 2023
1 parent 1ef6c96 commit 997ba79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/compiler/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1890,7 +1890,7 @@ function abstract_call_known(interp::AbstractInterpreter, @nospecialize(f),
fargs = nothing
end
argtypes = Any[typeof(<:), argtypes[3], argtypes[2]]
return CallMeta(abstract_call_known(interp, <:, ArgInfo(fargs, argtypes), si, sv, max_methods).rt, EFFECTS_TOTAL, NoCallInfo())
return abstract_call_known(interp, <:, ArgInfo(fargs, argtypes), si, sv, max_methods)
elseif la == 2 &&
(a2 = argtypes[2]; isa(a2, Const)) && (svecval = a2.val; isa(svecval, SimpleVector)) &&
istopfunction(f, :length)
Expand Down

0 comments on commit 997ba79

Please sign in to comment.