Skip to content

Commit

Permalink
fix repeated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
shashi committed Jan 9, 2021
1 parent dca86e8 commit e1dabbb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/methods.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@ for f in [+, -, *, \, /, ^]
T::Type{<:Number},
S::Type{<:Number}) = promote_type(T, S)
end
for f in [+, -, *]
@eval promote_symtype(::$(typeof(f)), T::Type{<:Number}) = T
end

promote_symtype(::typeof(rem2pi), T::Type{<:Number}, mode) = T
Base.rem2pi(x::Symbolic, mode::Base.RoundingMode) = term(rem2pi, x, mode)
Expand All @@ -113,7 +110,7 @@ rec_promote_symtype(f, x,y,z...) = rec_promote_symtype(f, promote_symtype(f, x,y
Base.:*(a::AbstractArray, b::Symbolic{<:Number}) = map(x->x*b, a)
Base.:*(a::Symbolic{<:Number}, b::AbstractArray) = map(x->a*x, b)

for f in [identity, one, zero, *, +]
for f in [identity, one, zero, *, +, -]
@eval promote_symtype(::$(typeof(f)), T::Type{<:Number}) = T
end

Expand Down

0 comments on commit e1dabbb

Please sign in to comment.