From 2841b43d1c6b228fc1e61cbbb2e9f1acbc572b37 Mon Sep 17 00:00:00 2001 From: odow Date: Mon, 15 Apr 2024 13:07:05 +1200 Subject: [PATCH] Add missing promote_operation method --- src/mutable_arithmetics.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mutable_arithmetics.jl b/src/mutable_arithmetics.jl index c3c47363332..cbfb48a27be 100644 --- a/src/mutable_arithmetics.jl +++ b/src/mutable_arithmetics.jl @@ -133,6 +133,14 @@ function _MA.promote_operation( return GenericQuadExpr{T,V} end +function _MA.promote_operation( + ::typeof(*), + ::Type{GenericAffExpr{T,V}}, + ::Type{GenericAffExpr{S,V}}, +) where {T,S,V<:AbstractVariableRef} + return GenericQuadExpr{_MA.promote_operation(*, T, S),V} +end + function _MA.isequal_canonical(x::T, y::T) where {T<:AbstractJuMPScalar} return isequal_canonical(x, y) end