Skip to content

Commit

Permalink
deprecated macro export, cf. issue JuliaMath#506
Browse files Browse the repository at this point in the history
  • Loading branch information
jverzani committed Jun 8, 2023
1 parent ae1cce1 commit 32df40c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export fromroots,
integrate,
derivative,
variable,
@variable,
@variable, # deprecated!!
isintegral,
ismonic

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

# Exported in #470. Exporting was a mistake!
#@variable x
#@variable x::Polynomial
#@variable x::Polynomial{t]
macro variable(x)
Base.depwarn("Export of macro `@variable` is deprecated due to naming conflicts", :variable)
q = Expr(:block)
if isa(x, Expr) && x.head == :(::)
x, P = x.args
Expand Down

0 comments on commit 32df40c

Please sign in to comment.