Skip to content

Commit 4384180

Browse files
committed
Drop compat code for IOContext ctor taking pairs from #427
1 parent cfd0637 commit 4384180

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ Currently, the `@compat` macro supports the following syntaxes:
9090
* `@compat finalizer(func, obj)` with the finalizer to run as the first argument and the object to be finalized
9191
as the second ([#24605]).
9292

93-
* `IOContext` accepting key-value `Pair`s ([#23271]).
94-
9593
* `get` do-block syntax supported when using `ENV` ([#23412]).
9694

9795
* `Some{T}` wraps `T` to signify that a result of `T<:Void` is expected ([#23642]).

src/Compat.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@ import Base64
3737

3838
include("compatmacro.jl")
3939

40-
# https://github.com/JuliaLang/julia/pull/23271
41-
@static if VERSION < v"0.7.0-DEV.1472"
42-
Base.IOContext(io::IO, arg1::Pair, arg2::Pair, args::Pair...) = IOContext(IOContext(io, arg1), arg2, args...)
43-
# needed for ambiguity resolution
44-
Base.IOContext(io::IOContext, arg1::Pair, arg2::Pair) = IOContext(IOContext(io, arg1), arg2)
45-
end
46-
4740
# 0.7.0-DEV.4527
4841
@static if !isdefined(Base, :UndefInitializer)
4942
import Base: Array, Matrix, Vector

test/old.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,3 +516,7 @@ let a = [1 0 0; 0 1 0; 0 0 1]
516516
@test Matrix(2I, 3, 3)::Matrix{Int} == Matrix(2I, (3, 3))::Matrix{Int} == 2a
517517
@test Matrix(2.0I, 3, 3)::Matrix{Float64} == Matrix(2.0I, (3, 3))::Matrix{Float64} == 2a
518518
end
519+
520+
# 0.7.0-DEV.1472
521+
@test get(IOContext(IOBuffer(), :arg1=>true, :arg2=>true, :arg3=>true), :arg3, false)
522+
@test get(IOContext(IOBuffer(), :arg1=>true, :arg2=>true), :arg2, false)

test/runtests.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ end
8888
@test isa(BitVector(undef, 2), BitVector)
8989
@test isa(BitArray(undef, 2, 2), BitMatrix)
9090

91-
# 0.7.0-DEV.1472
92-
@test get(IOContext(IOBuffer(), :arg1=>true, :arg2=>true, :arg3=>true), :arg3, false)
93-
@test get(IOContext(IOBuffer(), :arg1=>true, :arg2=>true), :arg2, false)
94-
9591
# 0.7
9692
let A = [1]
9793
local x = 0

0 commit comments

Comments
 (0)