From c0d927fe53f08d51efdbedb69e6c740b77e70206 Mon Sep 17 00:00:00 2001 From: Yichao Yu Date: Sun, 12 Feb 2017 19:26:52 -0500 Subject: [PATCH] Fix typealias depwarn on 0.6 --- src/FixedPointNumbers.jl | 2 +- src/fixed.jl | 2 +- src/normed.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FixedPointNumbers.jl b/src/FixedPointNumbers.jl index 98c683b9..afae3755 100644 --- a/src/FixedPointNumbers.jl +++ b/src/FixedPointNumbers.jl @@ -82,7 +82,7 @@ widen1(::Type{UInt64}) = UInt128 widen1(::Type{UInt128}) = UInt128 widen1(x::Integer) = x % widen1(typeof(x)) -typealias ShortInts Union{Int8,UInt8,Int16,UInt16} +const ShortInts = Union{Int8,UInt8,Int16,UInt16} floattype{T<:ShortInts,f}(::Type{FixedPoint{T,f}}) = Float32 floattype{T<:Integer,f}(::Type{FixedPoint{T,f}}) = Float64 diff --git a/src/fixed.jl b/src/fixed.jl index 7cae454f..b431dcdc 100644 --- a/src/fixed.jl +++ b/src/fixed.jl @@ -17,7 +17,7 @@ for T in (Int8, Int16, Int32, Int64) for f in 0:sizeof(T)*8-1 sym = Symbol(String(take!(showtype(_iotypealias, Fixed{T,f})))) @eval begin - typealias $sym Fixed{$T,$f} + const $sym = Fixed{$T,$f} export $sym end end diff --git a/src/normed.jl b/src/normed.jl index 0bcb517c..99ac5c30 100644 --- a/src/normed.jl +++ b/src/normed.jl @@ -15,7 +15,7 @@ for T in (UInt8, UInt16, UInt32, UInt64) for f in 0:sizeof(T)*8 sym = Symbol(String(take!(showtype(_iotypealias, Normed{T,f})))) @eval begin - typealias $sym Normed{$T,$f} + const $sym = Normed{$T,$f} export $sym end end