Skip to content

Commit

Permalink
Mark macros_have_sourceloc from #355 for future deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Sep 30, 2019
1 parent 8bb14de commit e4b882d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down

0 comments on commit e4b882d

Please sign in to comment.