Skip to content

Commit

Permalink
Drop compat code for hasmethod from #486
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Oct 8, 2019
1 parent 9a89be1 commit 8215da4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ Currently, the `@compat` macro supports the following syntaxes:
for entries with no match and gives the index of the first (rather than the last) match
([#25662], [#25998]).

* `method_exists` is now `hasmethod` ([#25615]).

* `object_id` is now `objectid` ([#25615]).

* `LinSpace` is now `LinRange` ([#25896]).
Expand Down
4 changes: 0 additions & 4 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ end
end

# 0.7.0-DEV.3455
@static if !isdefined(Base, :hasmethod)
const hasmethod = method_exists
export hasmethod
end
@static if !isdefined(Base, :objectid)
const objectid = object_id
export objectid
Expand Down
3 changes: 3 additions & 0 deletions test/old.jl
Original file line number Diff line number Diff line change
Expand Up @@ -727,3 +727,6 @@ let buf = IOBuffer()
end
@test startswith(String(take!(buf)), Base.text_colors[:red])
end

# 0.7.0-DEV.3455
@test hasmethod(sin, Tuple{Float64})
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ end
@test codeunit("foo") == codeunit(SubString("fooαβγ",1,3)) == UInt8

# 0.7.0-DEV.3455
@test hasmethod(sin, Tuple{Float64})
let x = y = 1
@test objectid(x) == objectid(y)
end
Expand Down

0 comments on commit 8215da4

Please sign in to comment.