diff --git a/README.md b/README.md index 702c0fdbd..c1a07a441 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ Currently, the `@compat` macro supports the following syntaxes: * `retry` for the more flexible `retry` method introduced in 0.6 which includes support for kwargs ([#19331], [#21419]). -## Renamed functions +## Renamed functions and types * `$` is now `xor` or `⊻` ([#18977]) @@ -182,6 +182,7 @@ Currently, the `@compat` macro supports the following syntaxes: `read(::IO, ::Type{String})`, `read(::AbstractString, ::Type{String})`, and `read(::Cmd, ::Type{String})` are defined for 0.6 and below. +* `Range` is now `AbstractRange` ([#23570]) ## New macros @@ -305,3 +306,4 @@ includes this fix. Find the minimum version from there. [#22751]: https://github.com/JuliaLang/julia/issues/22751 [#22761]: https://github.com/JuliaLang/julia/issues/22761 [#22864]: https://github.com/JuliaLang/julia/issues/22864 +[#23570]: https://github.com/JuliaLang/julia/issues/23570 diff --git a/src/Compat.jl b/src/Compat.jl index 7661ac3df..5be1fef91 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -582,6 +582,12 @@ if VERSION < v"0.7.0-DEV.1285" Base.OverflowError(msg) = OverflowError() end +# 0.7.0-DEV.1721 +@static if !isdefined(Base, :AbstractRange) + const AbstractRange = Range + export AbstractRange +end + include("deprecated.jl") end # module Compat diff --git a/test/runtests.jl b/test/runtests.jl index 7fa9a0f84..7bb0d7c21 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -767,6 +767,9 @@ no_specialize(@nospecialize(x::Integer)) = sin(2) @test contains(read(@__FILE__, String), "read(@__FILE__, String)") @test read(`$(Base.julia_cmd()) --startup-file=no -e "println(:aaaa)"`, String) == "aaaa\n" +# 0.7 +@test isa(1:2, AbstractRange) + if VERSION < v"0.6.0" include("deprecated.jl") end