Skip to content

Commit 28febbd

Browse files
authored
reduce unbound args (#442)
1 parent bdce97f commit 28febbd

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

src/common.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -944,12 +944,7 @@ function scalar_mult(c::S, p::P) where {S, T, X, P<:AbstractPolynomial{T, X}}
944944
𝐏([c * pᵢ for pᵢ coeffs(p)])
945945
end
946946

947-
scalar_mult(c::S, p::Union{P, R}) where {
948-
S<: AbstractPolynomial,
949-
T, X,
950-
P<:AbstractPolynomial{T, X},
951-
R <:AbstractPolynomial{T}
952-
} = throw(DomainError()) # avoid ambiguity, issue #435
947+
scalar_mult(p1::AbstractPolynomial, p2::AbstractPolynomial) = error("scalar_mult(::$(typeof(p1)), ::$(typeof(p2))) is not defined.") # avoid ambiguity, issue #435
953948

954949
function Base.:/(p::P, c::S) where {P <: AbstractPolynomial,S}
955950
_convert(p, coeffs(p) ./ c)

src/polynomials/ChebyshevT.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ function Base.divrem(num::ChebyshevT{T,X}, den::ChebyshevT{S,Y}) where {T,X,S,Y}
271271
return P(q_coeff), P(r_coeff)
272272
end
273273

274-
function showterm(io::IO, ::Type{ChebyshevT{T,X}}, pj::T, var, j, first::Bool, mimetype) where {N, T,X}
274+
function showterm(io::IO, ::Type{ChebyshevT{T,X}}, pj::T, var, j, first::Bool, mimetype) where {T,X}
275275
iszero(pj) && return false
276276
!first && print(io, " ")
277277
if hasneg(T)

src/rational-functions/common.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function Base.convert(::Type{P}, pq::PQ) where {P<:AbstractPolynomial, PQ<:Abstr
8282
convert(P, p) / constantterm(q)
8383
end
8484

85-
function Base.convert(::Type{S}, pq::PQ) where {S<:Number, T,X,P,PQ<:AbstractRationalFunction}
85+
function Base.convert(::Type{S}, pq::PQ) where {S<:Number, PQ<:AbstractRationalFunction}
8686
!isconstant(pq) && throw(ArgumentError("Can't convert non-constant rational function to a number"))
8787
S(pq(0))
8888
end

0 commit comments

Comments
 (0)