Skip to content

Commit 2de280b

Browse files
authored
deprecated macro export, cf. issue #506 (#507)
1 parent ae1cce1 commit 2de280b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/common.jl

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export fromroots,
1414
integrate,
1515
derivative,
1616
variable,
17-
@variable,
17+
@variable, # deprecated!!
1818
isintegral,
1919
ismonic
2020

@@ -881,10 +881,12 @@ variable(::Type{P}, var::SymbolLike) where {P <: AbstractPolynomial} = variable(
881881
variable(p::AbstractPolynomial, var = indeterminate(p)) = variable(typeof(p), var)
882882
variable(var::SymbolLike = :x) = variable(Polynomial{Int}, var)
883883

884+
# Exported in #470. Exporting was a mistake!
884885
#@variable x
885886
#@variable x::Polynomial
886887
#@variable x::Polynomial{t]
887888
macro variable(x)
889+
Base.depwarn("Export of macro `@variable` is deprecated due to naming conflicts", :variable)
888890
q = Expr(:block)
889891
if isa(x, Expr) && x.head == :(::)
890892
x, P = x.args

0 commit comments

Comments
 (0)