Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting created polynomial to const name errors out #83

Open
matbesancon opened this issue Mar 8, 2021 · 0 comments
Open

Setting created polynomial to const name errors out #83

matbesancon opened this issue Mar 8, 2021 · 0 comments

Comments

@matbesancon
Copy link

julia> using DynamicPolynomials, TypedPolynomials

julia> const XT = TypedPolynomials.@polyvar(XT[1:10])
(XT₁, XT₂, XT₃, XT₄, XT₅, XT₆, XT₇, XT₈, XT₉, XT₁₀)

julia> const XD = DynamicPolynomials.@polyvar(XD[1:10])
ERROR: invalid redefinition of constant XD
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/DynamicPolynomials/46iig/src/var.jl:36

Because a variable XD is already created at the top-level in the macro, which seems not to be the case for typed polynomials, which just create the tuple

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant