Skip to content

Commit

Permalink
Fix deprecation error for 2 arg airy
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbyrne authored Dec 30, 2016
1 parent 6ad62c4 commit b36e4d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1303,11 +1303,13 @@ function _airyx(k::Integer, z::Complex128)
end
end

for afn in (:airy,:airyx)
for
in (:airy,:airyx)
_afn = Symbol("_"*string(afn))
suf = string(afn)[5:end]
@eval begin
function $afn(k::Integer, z::Complex128)
afn = $(QuoteNode(afn))
depwarn("`$afn(k,x)` is deprecated, use `airyai$suf(x)`, `airyaiprime$suf(x)`, `airybi$suf(x)` or `airybiprime$suf(x)` instead.",$(QuoteNode(afn)))
$_afn(k,z)
end
Expand Down

0 comments on commit b36e4d9

Please sign in to comment.