Skip to content

Commit

Permalink
fix deprecated_binding (#26170)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre authored and KristofferC committed Feb 23, 2018
1 parent 5fe90ff commit 7a0b38d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ end

deprecate(m::Module, s::Symbol, flag=1) = ccall(:jl_deprecate_binding, Cvoid, (Any, Any, Cint), m, s, flag)

macro deprecate_binding(old, new, export_old=true, dep_message=nothing, constant=true)
dep_message == nothing && (dep_message = ", use $new instead.")
macro deprecate_binding(old, new, export_old=true, dep_message=:nothing, constant=true)
dep_message === :nothing && (dep_message = ", use $new instead.")
return Expr(:toplevel,
export_old ? Expr(:export, esc(old)) : nothing,
Expr(:const, Expr(:(=), esc(Symbol(string("_dep_message_",old))), esc(dep_message))),
Expand Down

0 comments on commit 7a0b38d

Please sign in to comment.