Skip to content

Commit

Permalink
Remove pre-0.6 code from deprecated.jl (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters authored Jan 22, 2019
1 parent 58c0b6e commit 3e9ac98
Showing 1 changed file with 12 additions and 34 deletions.
46 changes: 12 additions & 34 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
function depwarn_ex(msg, name)
return quote
if VERSION >= v"0.6.0"
Base.depwarn($msg, Symbol($name))
end
Base.depwarn($msg, Symbol($name))
end
end

function primarytype(@nospecialize(t))
tn = t.name
if isdefined(tn, :primary)
return tn.primary
else
return tn.wrapper
end
end
primarytype(@nospecialize(t)) = t.name.wrapper

export @functorize
macro functorize(f)
Expand All @@ -28,26 +19,13 @@ macro functorize(f)
end
end

@static if VERSION >= v"0.6.0"
Base.@deprecate_binding KERNEL Sys.KERNEL
Base.@deprecate_binding UTF8String Core.String
Base.@deprecate_binding ASCIIString Core.String
Base.@deprecate_binding unsafe_convert Base.unsafe_convert
Base.@deprecate_binding remote_do Distributed.remote_do
Base.@deprecate_binding Filesystem Base.Filesystem
Base.@deprecate_binding AsyncCondition Base.AsyncCondition
Base.@deprecate_binding promote_eltype_op Base.promote_eltype_op
@eval Base.@deprecate_binding $(Symbol("@irrational")) Base.$(Symbol("@irrational"))
@eval Base.@deprecate_binding $(Symbol("@blasfunc")) Compat.LinearAlgebra.BLAS.$(Symbol("@blasfunc"))
else
const KERNEL = Sys.KERNEL
const UTF8String = Core.String
const ASCIIString = Core.String
import Base.unsafe_convert
import Base.remote_do
import Base.Filesystem
import Base.AsyncCondition
import Base.promote_eltype_op
import Base.@irrational
import Base.LinAlg.BLAS.@blasfunc
end
Base.@deprecate_binding KERNEL Sys.KERNEL
Base.@deprecate_binding UTF8String Core.String
Base.@deprecate_binding ASCIIString Core.String
Base.@deprecate_binding unsafe_convert Base.unsafe_convert
Base.@deprecate_binding remote_do Distributed.remote_do
Base.@deprecate_binding Filesystem Base.Filesystem
Base.@deprecate_binding AsyncCondition Base.AsyncCondition
Base.@deprecate_binding promote_eltype_op Base.promote_eltype_op
@eval Base.@deprecate_binding $(Symbol("@irrational")) Base.$(Symbol("@irrational"))
@eval Base.@deprecate_binding $(Symbol("@blasfunc")) Compat.LinearAlgebra.BLAS.$(Symbol("@blasfunc"))

0 comments on commit 3e9ac98

Please sign in to comment.