Skip to content

Commit

Permalink
Use nothing instead of () to signify no available frame
Browse files Browse the repository at this point in the history
  • Loading branch information
mbauman committed Apr 19, 2018
1 parent 8acfdeb commit e570173
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ function __dot__(x::Expr)
if x.head == :&& || x.head == :||
Base.depwarn("""
using $(x.head) expressions in @. is deprecated; in the future it will
become elementwise. Break the expression into smaller parts instead.""", ())
become elementwise. Break the expression into smaller parts instead.""", nothing)
end
head = string(x.head)
if last(head) == '=' && first(head) != '.'
Expand Down
3 changes: 2 additions & 1 deletion base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ function depwarn(msg, funcsym)
_id=(frame,funcsym),
_group=:depwarn,
caller=caller,
maxlog=funcsym === () ? nothing : 1
maxlog=funcsym
)
nothing
end

firstcaller(bt::Vector, ::Nothing) = Ptr{Cvoid}(0), StackTraces.UNKNOWN
firstcaller(bt::Vector, funcsym::Symbol) = firstcaller(bt, (funcsym,))
function firstcaller(bt::Vector, funcsyms)
# Identify the calling line
Expand Down

0 comments on commit e570173

Please sign in to comment.