diff --git a/README.md b/README.md index fc6c81a88..de2ee7023 100644 --- a/README.md +++ b/README.md @@ -127,8 +127,6 @@ Currently, the `@compat` macro supports the following syntaxes: * `>:`, a supertype operator for symmetry with `issubtype` (`A >: B` is equivalent to `B <: A`), can be used in 0.5 and earlier ([#20407]). -* `iszero(x)` efficiently checks whether `x == zero(x)` (including arrays) can be used in 0.5 and earlier ([#19950]). - * `.&` and `.|` are short syntax for `broadcast(&, xs...)` and `broadcast(|, xs...)` (respectively) in Julia 0.6 (only supported on Julia 0.5 and above) ([#17623]) * `Compat.isapprox` with `nans` keyword argument ([#20022]) @@ -482,7 +480,6 @@ includes this fix. Find the minimum version from there. [#19449]: https://github.com/JuliaLang/julia/issues/19449 [#19635]: https://github.com/JuliaLang/julia/issues/19635 [#19784]: https://github.com/JuliaLang/julia/issues/19784 -[#19950]: https://github.com/JuliaLang/julia/issues/19950 [#20005]: https://github.com/JuliaLang/julia/issues/20005 [#20022]: https://github.com/JuliaLang/julia/issues/20022 [#20407]: https://github.com/JuliaLang/julia/issues/20407 diff --git a/src/Compat.jl b/src/Compat.jl index f9a8903ee..622ea036c 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -142,15 +142,6 @@ else end end -# julia #19950 -@static if !isdefined(Base, :iszero) - # 0.6 - iszero(x) = x == zero(x) - iszero(x::Number) = x == 0 - iszero(x::AbstractArray) = all(iszero, x) - export iszero -end - # julia #20407 @static if !isdefined(Base, :(>:)) # 0.6 diff --git a/test/runtests.jl b/test/runtests.jl index 8f2f4da84..81fef7124 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -62,22 +62,6 @@ let s = "Koala test: 🐨" end end -# julia#19950, tests from Base (#20028) -for T in (Float16, Float32, Float64, BigFloat, Int8, Int16, Int32, Int64, Int128, - BigInt, UInt8, UInt16, UInt32, UInt64, UInt128) - @test iszero(T(0)) - @test iszero(Complex{T}(0)) - if T<:Integer - @test iszero(Rational{T}(0)) - end - if T<:AbstractFloat - @test iszero(T(-0.0)) - @test iszero(Complex{T}(-0.0)) - end -end -@test !iszero([0, 1, 2, 3]) -@test iszero([0, 0, 0, 0]) - let x = view(1:10, 2:4) D = Diagonal(x)