Skip to content

Commit 00feaac

Browse files
authored
Restrict * methods for SimplePoly to Number's (#539)
This avoids invalidating other methods.
1 parent 42ec04a commit 00feaac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/expint.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ struct SimplePoly{T}
55
coeffs::Vector{T}
66
end
77

8-
Base.:*(p::SimplePoly, c) = SimplePoly(p.coeffs * c)
9-
Base.:*(c, p::SimplePoly) = p * c
8+
Base.:*(p::SimplePoly, c::Number) = SimplePoly(p.coeffs * c)
9+
Base.:*(c::Number, p::SimplePoly) = p * c
1010

1111
function Base.:+(p::SimplePoly{S}, q::SimplePoly{T}) where {S, T}
1212
n, m = length(p.coeffs), length(q.coeffs)

0 commit comments

Comments
 (0)