Skip to content

Commit

Permalink
Drop compat code for something from #562
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 8, 2019
1 parent 4b8279d commit 2470ca4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ Currently, the `@compat` macro supports the following syntaxes:

* Single-argument `permutedims(x)` for matrices and vectors ([#24839]).

* `something` to get the first argument different from `nothing`, unwrapping those
of the `Some` type ([#27258]).

* `mapslices` with `dims` keyword argument ([#27828]).

* `hasproperty` and `hasfield` ([#28850]).
Expand Down
8 changes: 0 additions & 8 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@ end
end
end

if VERSION < v"0.7.0-DEV.5278"
something() = throw(ArgumentError("No value arguments present"))
something(x::Nothing, y...) = something(y...)
something(x::Some, y...) = x.value
something(x::Any, y...) = x
export something
end

if !isdefined(LinearAlgebra, :opnorm) # julia#27401
opnorm(A::AbstractMatrix, p::Real=2) = LinearAlgebra.norm(A, p)
const norm = LinearAlgebra.vecnorm
Expand Down
6 changes: 6 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1201,3 +1201,9 @@ let s = "∀α>β:α+1>β"
end
end
end

# 0.7.0-DEV.5278
@test something(nothing, 1) === 1
@test something(Some(2)) === 2
@test something(Some(2), 1) === 2
@test something(nothing, Some(1)) === 1
6 changes: 0 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ let A = [1]
@test x == 1
end

# 0.7.0-DEV.5278
@test something(nothing, 1) === 1
@test something(Some(2)) === 2
@test something(Some(2), 1) === 2
@test something(nothing, Some(1)) === 1

# julia#24839
@test permutedims([1 2; 3 4]) == [1 3; 2 4]
@test permutedims([1,2,3]) == [1 2 3]
Expand Down

0 comments on commit 2470ca4

Please sign in to comment.