diff --git a/README.md b/README.md index ea5585ba2..e55082204 100644 --- a/README.md +++ b/README.md @@ -128,8 +128,6 @@ Currently, the `@compat` macro supports the following syntaxes: * `Compat.invokelatest` supports keywords ([#22646]). -* `@__MODULE__` is aliased to `current_module()` for Julia versions 0.6 and below. Versions of `Base.binding_module`, `expand`, `macroexpand`, and `include_string` were added that accept a module as the first argument. ([#22064]) - * `Cmd` elements can be accessed as if the `Cmd` were an array of strings for 0.6 and below ([#21197]). * `Val(x)` constructs `Val{x}()`. ([#22475]) diff --git a/src/Compat.jl b/src/Compat.jl index 83fbe36d6..d4ed5a555 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -7,21 +7,6 @@ import Sockets include("compatmacro.jl") -# https://github.com/JuliaLang/julia/pull/22064 -@static if !isdefined(Base, Symbol("@__MODULE__")) - # 0.7 - export @__MODULE__ - macro __MODULE__() - return current_module() - end - Base.expand(mod::Module, x::ANY) = eval(mod, :(expand($(QuoteNode(x))))) - Base.macroexpand(mod::Module, x::ANY) = eval(mod, :(macroexpand($(QuoteNode(x))))) - Base.include_string(mod::Module, code::String, fname::String) = - eval(mod, :(include_string($code, $fname))) - Base.include_string(mod::Module, code::AbstractString, fname::AbstractString="string") = - eval(mod, :(include_string($code, $fname))) -end - @static if !isdefined(Base, :isabstracttype) # VERSION < v"0.7.0-DEV.3475" const isabstracttype = Base.isabstract export isabstracttype diff --git a/test/old.jl b/test/old.jl index 64c04ca25..ca4a90136 100644 --- a/test/old.jl +++ b/test/old.jl @@ -40,3 +40,10 @@ no_specialize_kw2(@nospecialize(x::Integer=0)) = sin(2) @test no_specialize_kw2(1.0) == sin(1) @test no_specialize_kw2(1) == sin(2) @test no_specialize_kw2() == sin(2) + +# PR 22064 +module Test22064 +using Compat +using Compat.Test +@test (@__MODULE__) === Test22064 +end diff --git a/test/runtests.jl b/test/runtests.jl index 770034c4d..654ced69c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -132,13 +132,6 @@ for (t, s, m, kept) in [ @test Compat.readuntil(IOBuffer(t), collect(s)::Vector{Char}, keep=true) == Vector{Char}(kept) end -# PR 22064 -module Test22064 -using Compat -using Compat.Test -@test (@__MODULE__) === Test22064 -end - # invokelatest with keywords pr22646(x; y=0) = 1 let foo() = begin