diff --git a/stdlib/InteractiveUtils/src/codeview.jl b/stdlib/InteractiveUtils/src/codeview.jl index 3cb792c75b9b4..b7c2d0bfc1924 100644 --- a/stdlib/InteractiveUtils/src/codeview.jl +++ b/stdlib/InteractiveUtils/src/codeview.jl @@ -57,10 +57,13 @@ Keyword argument `debuginfo` may be one of `:source` or `:none` (default), to sp See [`@code_warntype`](@ref man-code-warntype) for more information. """ -function code_warntype(io::IO, @nospecialize(f), @nospecialize(t); debuginfo::Symbol=:default, optimize::Bool=false) +function code_warntype(io::IO, @nospecialize(f), @nospecialize(t); + debuginfo::Symbol=:default, optimize::Bool=false, + world = Base.get_world_counter(), + interp = Core.Compiler.NativeInterpreter(world)) debuginfo = Base.IRShow.debuginfo(debuginfo) lineprinter = Base.IRShow.__debuginfo[debuginfo] - for (src, rettype) in code_typed(f, t, optimize=optimize) + for (src, rettype) in code_typed(f, t; optimize, world, interp) lambda_io::IOContext = io p = src.parent nargs::Int = 0