Skip to content

Commit fdfe477

Browse files
authored
Merge pull request #28 from JuliaAlgebra/bl/coeftypeplus
Fix sum with monomial for arithmetic that change with addition
2 parents b316731 + 933e909 commit fdfe477

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/operators.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ end
5555

5656
Base.:(+)(x::TermPoly{C}, y::TermPoly{C}) where C = plusorminus(x, y, +)
5757
Base.:(-)(x::TermPoly{C}, y::TermPoly{C}) where C = plusorminus(x, y, -)
58-
Base.:(+)(x::TermPoly{C, T}, y::Union{Monomial,PolyVar}) where {C, T} = x + Term{C, T}(y)
59-
Base.:(+)(x::Union{Monomial,PolyVar}, y::TermPoly{C, T}) where {C, T} = Term{C, T}(x) + y
58+
Base.:(+)(x::TermPoly{C}, y::Union{Monomial,PolyVar}) where C = x + Term{C}(y)
59+
Base.:(+)(x::Union{Monomial,PolyVar}, y::TermPoly{C}) where C = Term{C}(x) + y
6060

6161
Base.:(-)(x::TermPoly{T}, y::DMonomialLike) where T = x - Term{T}(y)
6262
Base.:(-)(x::DMonomialLike, y::TermPoly{T}) where T = Term{T}(x) - y

0 commit comments

Comments
 (0)