diff --git a/src/macros.jl b/src/macros.jl index 52b3add118f..a1b493619fe 100644 --- a/src/macros.jl +++ b/src/macros.jl @@ -163,10 +163,10 @@ _functionize(::MutableArithmetics.Zero) = 0.0 function parse_one_operator_constraint(_error::Function, vectorized::Bool, sense::Val, lhs, rhs) # Simple comparison - move everything to the LHS. # - # Note: We add the +0 to this term to account for the pathological case that - # the `lhs` is a `VariableRef` and the `rhs` is a summation with no terms. - # Without the `+0` term, `aff` would evaluate to a `VariableRef` when we - # really want it to be a `GenericAffExpr`. + # `_functionize` deals with the pathological case where the `lhs` is a `VariableRef` + # and the `rhs` is a summation with no terms. `_build_call` should be passed a + # `GenericAffExpr` or a `GenericQuadExpr`, and not a `VariableRef` as would be the case + # without `_functionize`. if vectorized func = :($lhs .- $rhs) else