From e4b882d353048aaff007f7d1006fbeb4daba4905 Mon Sep 17 00:00:00 2001 From: Martin Holters Date: Mon, 30 Sep 2019 17:25:18 +0200 Subject: [PATCH] Mark `macros_have_sourceloc` from #355 for future deprecation --- README.md | 2 -- src/Compat.jl | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index a45540f7a..f824fd72d 100644 --- a/README.md +++ b/README.md @@ -358,8 +358,6 @@ Currently, the `@compat` macro supports the following syntaxes: * On versions of Julia that do not contain a Base.Threads module, Compat defines a Threads module containing a no-op `@threads` macro. -* The `Expr(:macrocall)` has an extra initial argument `__source__`, which can be tested for with `Compat.macros_have_sourceloc`. - ## New types * `Compat.AbstractDateTime` is an alias for `Compat.Dates.AbstractDateTime` as of ([#25227]) and `Compat.Dates.TimeType` prior to that. diff --git a/src/Compat.jl b/src/Compat.jl index 7c84536c5..640942598 100644 --- a/src/Compat.jl +++ b/src/Compat.jl @@ -11,12 +11,10 @@ module TypeUtils export isabstract, parameter_upper_bound, typename end # module TypeUtils import Base.invokelatest +const macros_have_sourceloc = true include("compatmacro.jl") -# https://github.com/JuliaLang/julia/pull/21746 -const macros_have_sourceloc = VERSION >= v"0.7-" && length(:(@test).args) == 2 - # 0.7.0-DEV.3155 @static if !isdefined(Base, :pushfirst!) const pushfirst! = unshift!