Skip to content

Commit d179c6e

Browse files
committed
Drop compat code for nameof from #471
1 parent 3e8d7b9 commit d179c6e

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ Currently, the `@compat` macro supports the following syntaxes:
141141

142142
* `reprmime(mime, x)` is now `repr(mime, x)` ([#25990]) and `mimewritable` is now `showable` ([#26089]).
143143

144-
* `module_name`, `Base.function_name`, and `Base.datatype_name` are now methods of a
145-
new function called `nameof` ([#25622]).
146-
147144
* `search` is now `findfirst`/`findnext` and `rsearch` is now `findlast`/`findprev`,
148145
sometimes combined with `isequal` or `in` ([#24673], [#26436]).
149146

src/Compat.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,6 @@ end
7171
end
7272
end
7373

74-
@static if !isdefined(Base, :nameof)
75-
nameof(m::Module) = Base.module_name(m)
76-
nameof(f::Function) = Base.function_name(f)
77-
nameof(t::Union{DataType,UnionAll}) = Base.datatype_name(t)
78-
export nameof
79-
end
80-
8174
# 0.7.0-DEV.3469
8275
@static if !isdefined(Base, :GC)
8376
@eval module GC

test/old.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,3 +659,9 @@ end
659659

660660
@test codeunits("foo") == [0x66,0x6f,0x6f] == codeunits(SubString("fooαβγ",1,3))
661661
@test ncodeunits("αβγ") == 6 == ncodeunits(SubString("fooαβγ",4,8))
662+
663+
# 0.7.0-DEV.3539
664+
@test nameof(Compat.Sys) == :Sys
665+
@test nameof(sin) == :sin
666+
@test nameof(Float64) == :Float64
667+
@test nameof(Array) == :Array

test/runtests.jl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,6 @@ end
8282

8383
@test codeunit("foo") == codeunit(SubString("fooαβγ",1,3)) == UInt8
8484

85-
# 0.7.0-DEV.3539
86-
@test nameof(Compat.Sys) == :Sys
87-
@test nameof(sin) == :sin
88-
@test nameof(Float64) == :Float64
89-
@test nameof(Array) == :Array
90-
9185
module TestPkg
9286
using Compat
9387
using Compat.Pkg

0 commit comments

Comments
 (0)