Skip to content

Commit 7a13377

Browse files
refactor: use new polynomial_merge!
1 parent a0e6d3e commit 7a13377

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/operators.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ end
183183
# TODO need to check that this also works for non-commutative
184184
function MA.operate!(
185185
op::Union{typeof(+),typeof(-)},
186-
p::Polynomial{V},
187-
q::Polynomial{V},
188-
) where {V<:Commutative}
186+
p::Polynomial{V, M1, T1},
187+
q::Polynomial{V, M2, T2},
188+
) where {V<:Commutative, M1, M2, T1, T2}
189189
if MP.variables(p) != MP.variables(q)
190190
allvars, maps = ___add_variables!(p, q)
191191
if length(allvars) == length(MP.variables(q))
@@ -239,6 +239,7 @@ function MA.operate!(
239239
combine,
240240
keep,
241241
resize,
242+
Tuple{MA.promote_operation(op, T1, T2), Vector{Int}},
242243
)
243244
return p
244245
end

0 commit comments

Comments
 (0)