Closed odow closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.40%. Comparing base (
509ab61
) to head (04f0fc9
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Where are the methods?
I added because the stack trace from #3736 includes
[1] _instantiate_zero(::Type{MutableArithmetics.Zero})
@ MutableArithmetics ~/.julia/dev/MutableArithmetics/src/interface.jl:28
[2] promote_operation_fallback(op::typeof(*), ::Type{QuadExpr}, ::Type{MutableArithmetics.Zero})
@ MutableArithmetics ~/.julia/dev/MutableArithmetics/src/interface.jl:51
[3] promote_operation(::typeof(*), ::Type, ::Type)
@ MutableArithmetics ~/.julia/dev/MutableArithmetics/src/interface.jl:113
[4] mutability(::Type, ::Function, ::Type, ::Type)
@ MutableArithmetics ~/.julia/dev/MutableArithmetics/src/interface.jl:273
[5] mutability(::QuadExpr, ::Function, ::QuadExpr, ::MutableArithmetics.Zero)
@ MutableArithmetics ~/.julia/dev/MutableArithmetics/src/interface.jl:281
[6] operate!!(::typeof(*), ::QuadExpr, ::MutableArithmetics.Zero)
@ MutableArithmetics ~/.julia/dev/MutableArithmetics/src/interface.jl:616
This is going to additionally call zero(QuadExpr)
to check whether the expression is mutable.
Then we should probably implement promote_operation
instead ?
Changed to implement promote_operation
This should be in MA next to https://github.com/jump-dev/MutableArithmetics.jl/blob/a6ed0f5ef5dfe67e463382d0b2d9ada60d77c673/src/rewrite.jl#L61
Closes #3736
Needs release with https://github.com/jump-dev/MutableArithmetics.jl/pull/283 before merging.