Skip to content

Commit fb22ce5

Browse files
committed
Fix promotion of product of monomials
1 parent b0adb45 commit fb22ce5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/promote.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ function MA.promote_operation(
2727
U = MA.promote_operation(op, S, T)
2828
return polynomialtype(promote_type(monomialtype(PT), monomialtype(QT)), U)
2929
end
30-
function MA.promote_operation(::typeof(*), MT::Type{<:AbstractMonomialLike},
31-
::Type{<:AbstractMonomialLike})
32-
return monomialtype(MT)
30+
function MA.promote_operation(::typeof(*), MT1::Type{<:AbstractMonomialLike},
31+
MT2::Type{<:AbstractMonomialLike})
32+
return typeof(constantmonomial(MT1) * constantmonomial(MT2))
3333
end
3434
function MA.promote_operation(::typeof(*), TT::Type{<:AbstractTermLike{S}},
3535
ST::Type{<:AbstractTermLike{T}}) where {S, T}

0 commit comments

Comments
 (0)