diff --git a/README.md b/README.md index 20b5b9cd1..fc80fbc74 100644 --- a/README.md +++ b/README.md @@ -120,8 +120,6 @@ Currently, the `@compat` macro supports the following syntaxes: * `isnothing` for testing if a variable is equal to `nothing` ([#29674]). -* There are versions of `InexactError`, `DomainError`, and `OverflowError` that take the same arguments as introduced in Julia 0.7-DEV ([#20005], [#22751], [#22761]). - * `Base.rtoldefault` how takes a third parameter `atol`. The two argument form is deprecated in favor of the three arguments form with `atol=0`. diff --git a/src/Compat.jl b/src/Compat.jl index 6877d44ac..79dc9e219 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -22,22 +22,6 @@ end include("compatmacro.jl") -# https://github.com/JuliaLang/julia/pull/20005 -if VERSION < v"0.7.0-DEV.896" - Base.InexactError(name::Symbol, T, val) = InexactError() -end - -# https://github.com/JuliaLang/julia/pull/22751 -if VERSION < v"0.7.0-DEV.924" - Base.DomainError(val) = DomainError() - Base.DomainError(val, msg) = DomainError() -end - -# https://github.com/JuliaLang/julia/pull/22761 -if VERSION < v"0.7.0-DEV.1285" - Base.OverflowError(msg) = OverflowError() -end - if VERSION < v"0.7.0-DEV.755" # This is a hack to only add keyword signature that won't work on all julia versions. # However, since we really only need to support a few (0.5, 0.6 and early 0.7) versions diff --git a/test/old.jl b/test/old.jl index f9e6f2541..beb504fe8 100644 --- a/test/old.jl +++ b/test/old.jl @@ -212,3 +212,13 @@ let cmd = `$(Base.julia_cmd()) --startup-file=no -e "println(:aaaa)"` @test read(cmd, String) == "aaaa\n" @test read(pipeline(cmd, stderr=devnull), String) == "aaaa\n" end + +# PR 20005 +@test_throws InexactError throw(InexactError(:func, Int, 3.2)) + +# PR 22751 +@test_throws DomainError throw(DomainError(-2)) +@test_throws DomainError throw(DomainError(-2, "negative")) + +# PR 22761 +@test_throws OverflowError throw(OverflowError("overflow")) diff --git a/test/runtests.jl b/test/runtests.jl index 44792cba6..b5c4e3c49 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -72,16 +72,6 @@ if VERSION < v"0.7.0-DEV.880" end end -# PR 20005 -@test_throws InexactError throw(InexactError(:func, Int, 3.2)) - -# PR 22751 -@test_throws DomainError throw(DomainError(-2)) -@test_throws DomainError throw(DomainError(-2, "negative")) - -# PR 22761 -@test_throws OverflowError throw(OverflowError("overflow")) - # PR 22907 using Compat: pairs