From e570173641d146709777fe5c3dbd1eed432b5ae2 Mon Sep 17 00:00:00 2001 From: Matt Bauman Date: Thu, 19 Apr 2018 14:57:33 -0400 Subject: [PATCH] Use nothing instead of () to signify no available frame --- base/broadcast.jl | 2 +- base/deprecated.jl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/base/broadcast.jl b/base/broadcast.jl index d6d7e72149ad3..55dd8313172b0 100644 --- a/base/broadcast.jl +++ b/base/broadcast.jl @@ -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) != '.' diff --git a/base/deprecated.jl b/base/deprecated.jl index 6389ed42dcf9b..7880d600f1597 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -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