Skip to content

Commit bcf41ba

Browse files
authored
minor fixup for #55705 (#55726)
1 parent 3653b38 commit bcf41ba

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

base/compiler/abstractinterpretation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2232,7 +2232,8 @@ function abstract_throw_methoderror(interp::AbstractInterpreter, argtypes::Vecto
22322232
elseif !isvarargtype(argtypes[2])
22332233
MethodError
22342234
else
2235-
tmerge(𝕃ᵢ, MethodError, ArgumentError)
2235+
= join(typeinf_lattice(interp))
2236+
MethodError ArgumentError
22362237
end
22372238
return CallMeta(Union{}, exct, EFFECTS_THROWS, NoCallInfo())
22382239
end

test/compiler/inference.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6137,3 +6137,7 @@ end == TypeError
61376137
@test Base.infer_exception_type((Char,)) do x
61386138
invoke(f_invoke_exct, Tuple{Number}, x)
61396139
end == TypeError
6140+
6141+
@test Base.infer_exception_type((Vector{Any},)) do args
6142+
Core.throw_methoderror(args...)
6143+
end == Union{MethodError,ArgumentError}

0 commit comments

Comments
 (0)