diff --git a/src/macros.jl b/src/macros.jl index 37b42b10fa0..736a1608e84 100644 --- a/src/macros.jl +++ b/src/macros.jl @@ -188,6 +188,15 @@ function parse_constraint(_error::Function, sense::Symbol, lhs, rhs) (sense, vectorized) = _check_vectorized(sense) vectorized, parse_one_operator_constraint(_error, vectorized, Val(sense), lhs, rhs)... end +function parse_constraint(_error::Function, ::Val{:call}, args...) + return parse_constraint(_error, Val(args[1]), args[2:end]...) +end + +function parse_constraint(_error::Function, sense::Val, F...) + sense_symbol = typeof(sense).parameters[1] + (sense, vectorized) = _check_vectorized(sense_symbol) + vectorized, parse_one_operator_constraint(_error, vectorized, Val(sense), F...)... +end function parse_ternary_constraint(_error::Function, vectorized::Bool, lb, ::Union{Val{:(<=)}, Val{:(≤)}}, aff, rsign::Union{Val{:(<=)}, Val{:(≤)}}, ub) newaff, parseaff = _MA.rewrite(aff)