Skip to content

Commit

Permalink
Improve inference in errorshow
Browse files Browse the repository at this point in the history
Fixes some invalidations
  • Loading branch information
timholy committed Jun 13, 2020
1 parent 7e258a2 commit b4eed11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/errorshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,8 @@ function show_backtrace(io::IO, t::Vector)
isempty(filtered) && return

if length(filtered) == 1 && StackTraces.is_top_level_frame(filtered[1][1])
f = filtered[1][1]
if f.line == 0 && f.file == Symbol("")
f = filtered[1][1]::StackFrame
if f.line == 0 && f.file === Symbol("")
# don't show a single top-level frame with no location info
return
end
Expand Down Expand Up @@ -693,7 +693,7 @@ function _simplify_include_frames(trace)
# Hack: allow `mod==nothing` as a workaround for inlined functions.
# TODO: Fix this by improving debug info.
if mod in (Base,Core,nothing) && 1+first_ignored-i <= 5
if frame.func == :eval
if frame.func === :eval
kept_frames[i:first_ignored] .= false
first_ignored = nothing
end
Expand Down

0 comments on commit b4eed11

Please sign in to comment.