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

constants interpolation not working on julia 1.6 upwards #180

Closed
lucaferranti opened this issue Mar 25, 2021 · 2 comments
Closed

constants interpolation not working on julia 1.6 upwards #180

lucaferranti opened this issue Mar 25, 2021 · 2 comments

Comments

@lucaferranti
Copy link
Member

Constant interpolation does not seem to work anymore when defining constraints.

In julia 1.5

julia> a = 3
3

julia> S = @constraint x^2 + y^2 - $a <= 0
Separator:
  - variables: x, y
  - expression: (x ^ 2 + y ^ 2) - 3 ∈ [-∞, 0]

whereas in julia 1.6

   julia> a = 3
3

julia> S = @constraint x^2 + y^2 - $a < 0
ERROR: UndefVarError: a not defined
Stacktrace:
 [1] top-level scope
   @ ~\.julia\packages\IntervalConstraintProgramming\ThYlN\src\separator.jl:153
@lucaferranti
Copy link
Member Author

I wonder whether this change in 1.6 is the reason of the issue (from here )

Macros that return :quote expressions (e.g. via Expr(:quote, ...)) were previously able to work without escaping (esc(...)) their output when needed. This has been corrected, and now esc must be used in these macros as it is in other macros.

@dpsanders
Copy link
Member

This should no longer be necessary in v0.14.
Please feel free to re-open if this functionality is still missing.

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

2 participants