Skip to content

Commit

Permalink
Drop compat code for IOContext ctor taking pairs from #427
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 4, 2019
1 parent 04c1b13 commit ae4edc6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ Currently, the `@compat` macro supports the following syntaxes:
* `@compat finalizer(func, obj)` with the finalizer to run as the first argument and the object to be finalized
as the second ([#24605]).

* `IOContext` accepting key-value `Pair`s ([#23271]).

* `get` do-block syntax supported when using `ENV` ([#23412]).

* `Some{T}` wraps `T` to signify that a result of `T<:Void` is expected ([#23642]).
Expand Down
7 changes: 0 additions & 7 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ import Base64

include("compatmacro.jl")

# https://github.com/JuliaLang/julia/pull/23271
@static if VERSION < v"0.7.0-DEV.1472"
Base.IOContext(io::IO, arg1::Pair, arg2::Pair, args::Pair...) = IOContext(IOContext(io, arg1), arg2, args...)
# needed for ambiguity resolution
Base.IOContext(io::IOContext, arg1::Pair, arg2::Pair) = IOContext(IOContext(io, arg1), arg2)
end

# 0.7.0-DEV.4527
@static if !isdefined(Base, :UndefInitializer)
import Base: Array, Matrix, Vector
Expand Down
4 changes: 4 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -516,3 +516,7 @@ let a = [1 0 0; 0 1 0; 0 0 1]
@test Matrix(2I, 3, 3)::Matrix{Int} == Matrix(2I, (3, 3))::Matrix{Int} == 2a
@test Matrix(2.0I, 3, 3)::Matrix{Float64} == Matrix(2.0I, (3, 3))::Matrix{Float64} == 2a
end

# 0.7.0-DEV.1472
@test get(IOContext(IOBuffer(), :arg1=>true, :arg2=>true, :arg3=>true), :arg3, false)
@test get(IOContext(IOBuffer(), :arg1=>true, :arg2=>true), :arg2, false)
4 changes: 0 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ end
@test isa(BitVector(undef, 2), BitVector)
@test isa(BitArray(undef, 2, 2), BitMatrix)

# 0.7.0-DEV.1472
@test get(IOContext(IOBuffer(), :arg1=>true, :arg2=>true, :arg3=>true), :arg3, false)
@test get(IOContext(IOBuffer(), :arg1=>true, :arg2=>true), :arg2, false)

# 0.7
let A = [1]
local x = 0
Expand Down

0 comments on commit ae4edc6

Please sign in to comment.