Closed blegat closed 1 month ago
model = Model() @variable(model, b, Bin) @variable(model, x) @constraint(model, b => {x in MOI.EqualTo(1.0)})
gives
ERROR: LoadError: UndefVarError: `##3910` not defined Stacktrace: [1] macro expansion @ ~/.julia/packages/JuMP/W1IDA/src/macros/@constraint.jl:171 [inlined] [2] macro expansion @ ~/.julia/packages/JuMP/W1IDA/src/macros.jl:393 [inlined]
The hygiene seems ok if you do x == 1 but not with the in syntax
x == 1
in
Hmm. Yeah. I don't think we considered this, but we should throw a nicer error message.
Simple fix: https://github.com/jump-dev/JuMP.jl/pull/3813
gives
The hygiene seems ok if you do
x == 1
but not with thein
syntax