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.
  • Loading branch information
staticfloat authored Feb 7, 2023
1 parent 3fe69f4 commit 0ab6e2f
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 @@ -2034,7 +2034,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 0ab6e2f

Please sign in to comment.