diff --git a/base/range.jl b/base/range.jl index ae2274f9330af..554b9148d1abe 100644 --- a/base/range.jl +++ b/base/range.jl @@ -156,12 +156,6 @@ function frange{T<:FloatingPoint}(start::T, step::T, stop::T) start, step, one(step), floor(r)+1 end -colon{T<:FloatingPoint}(start::T, step::T, stop::T) = - step == 0 ? error("step cannot be zero in colon syntax") : - start == stop ? FloatRange{T}(start,step,1,1) : - (0 < step) != (start < stop) ? FloatRange{T}(start,step,1,0) : - FloatRange{T}(frange(start,step,stop)...) - similar(r::Ranges, T::Type, dims::Dims) = Array(T, dims) length(r::Ranges) = integer(r.len) diff --git a/base/sysimg.jl b/base/sysimg.jl index 0f50460ade6ed..c7ab107906e77 100644 --- a/base/sysimg.jl +++ b/base/sysimg.jl @@ -119,6 +119,13 @@ include("cartesian.jl") using .Cartesian include("multidimensional.jl") +# FIXME: #5885 +colon{T<:FloatingPoint}(start::T, step::T, stop::T) = + step == 0 ? error("step cannot be zero in colon syntax") : + start == stop ? FloatRange{T}(start,step,1,1) : + (0 < step) != (start < stop) ? FloatRange{T}(start,step,1,0) : + FloatRange{T}(frange(start,step,stop)...) + # core math functions include("floatfuncs.jl") include("math.jl")