Skip to content

Commit 12ebee9

Browse files
vtjnashKristofferC
authored andcommitted
[InteractiveUtils] specify code_warntype vararg length (#59726)
Avoids a stack overflow when mistyping arguments, allowing for a better MethodError. Issue introduced by #51109 Fixes #57597 (cherry picked from commit 6e697c3)
1 parent e87afd3 commit 12ebee9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/InteractiveUtils/src/codeview.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ function code_warntype(io::IO, @nospecialize(f), @nospecialize(tt=Base.default_t
176176
end
177177
nothing
178178
end
179-
code_warntype(args...; kwargs...) = (@nospecialize; code_warntype(stdout, args...; kwargs...))
179+
code_warntype(f; kwargs...) = (@nospecialize; code_warntype(stdout, f; kwargs...))
180+
code_warntype(f, argtypes; kwargs...) = (@nospecialize; code_warntype(stdout, f, argtypes; kwargs...))
180181

181182
using Base: CodegenParams
182183

0 commit comments

Comments
 (0)