Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions base/stacktraces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ function show_spec_linfo(io::IO, frame::StackFrame)
else
# Equivalent to the default implementation of `show_custom_spec_sig`
# for `linfo isa CodeInstance`, but saves an extra dynamic dispatch.
show_spec_sig(io, def, frame_mi(frame).specTypes)
mi = frame_mi(frame)::MethodInstance
show_spec_sig(io, def::Method, mi.specTypes)
end
else
m = linfo::Method
Expand All @@ -297,7 +298,8 @@ end
# Can be extended by compiler packages to customize backtrace display of custom code instance frames
function show_custom_spec_sig(io::IO, @nospecialize(owner), linfo::CodeInstance, frame::StackFrame)
mi = Base.get_ci_mi(linfo)
return show_spec_sig(io, mi.def, mi.specTypes)
m = mi.def::Method # the case ::Module is handled in show_spec_linfo
return show_spec_sig(io, m, mi.specTypes)
end

function show_spec_sig(io::IO, m::Method, @nospecialize(sig::Type))
Expand Down