Skip to content

Commit efd8847

Browse files
committed
more fixes for Julia v0.7
1 parent 91e3c10 commit efd8847

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ColorVectorSpace.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ mapreduce(f, op::Union{typeof(&), typeof(|)}, a::MathTypes) = f(a) # ambiguity
5252
mapreduce(f, op, a::MathTypes) = f(a)
5353
if isdefined(Base, :r_promote)
5454
Base.r_promote(::typeof(+), c::MathTypes) = mapc(x->Base.r_promote(+, x), c)
55-
else
55+
elseif isdefined(Base, :promote_sys_size_add)
5656
Base.promote_sys_size_add(c::MathTypes) = mapc(Base.promote_sys_size_add, c)
57+
else
58+
Base.add_sum(c1::MathTypes,c2::MathTypes) = mapc(Base.add_sum, c1, c2)
5759
end
5860

5961
for f in (:trunc, :floor, :round, :ceil, :eps, :bswap)
@@ -304,6 +306,7 @@ Compat.@dep_vectorize_2arg Gray min
304306

305307
# Arrays
306308
+(A::AbstractArray{C}) where {C<:MathTypes} = A
309+
+(A::Array{C}) where {C<:MathTypes} = A
307310

308311
(+)(A::AbstractArray{CV}, b::AbstractRGB) where {CV<:AbstractRGB} = (.+)(A, b)
309312
(+)(b::AbstractRGB, A::AbstractArray{CV}) where {CV<:AbstractRGB} = (.+)(b, A)

0 commit comments

Comments
 (0)