From 5364504737623b197b7a81b59d5d4b9c11bb6013 Mon Sep 17 00:00:00 2001 From: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Date: Mon, 13 May 2024 18:28:24 +0200 Subject: [PATCH] one more --- src/constraints/GenericConstraint.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/constraints/GenericConstraint.jl b/src/constraints/GenericConstraint.jl index 78bdcf6d3..c314c3d8d 100644 --- a/src/constraints/GenericConstraint.jl +++ b/src/constraints/GenericConstraint.jl @@ -86,6 +86,9 @@ end function _add_constraint!(context::Context, c::GenericConstraint) if vexity(c.child) == ConstVexity() + # This `evaluate` call is safe, since even if it refers to a `fix!`'d variable, + # it happens when we are formulating the problem (not at expression-time), so there + # is not time for the variable to be re-`fix!`'d to a different value (or `free!`'d) if !is_feasible(evaluate(c.child), c.set, CONSTANT_CONSTRAINT_TOL[]) context.detected_infeasible_during_formulation = true end