Skip to content

Commit ff8c774

Browse files
carlobaldassiTomas Lycken
authored andcommitted
Fix failing test
1 parent b3c3ba7 commit ff8c774

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/b-splines/multivalued.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module NonNumeric
33
# Test interpolation with a multi-valued type
44

55
using Interpolations
6+
using Compat
67

78
import Base: +, -, *, /
89

@@ -20,6 +21,8 @@ end
2021
Base.one{T}(::Type{MyPair{T}}) = MyPair(one(T),one(T))
2122
Base.zero{T}(::Type{MyPair{T}}) = MyPair(zero(T),zero(T))
2223
Base.promote_rule{T1,T2<:Number}(::Type{MyPair{T1}}, ::Type{T2}) = MyPair{promote_type(T1,T2)}
24+
Base.promote_op{T1,T2<:Number}(::typeof(@functorize(*)), ::Type{MyPair{T1}}, ::Type{T2}) = MyPair{promote_type(T1,T2)}
25+
Base.promote_op{T1<:Number,T2}(::typeof(@functorize(*)), ::Type{T1}, ::Type{MyPair{T2}}) = MyPair{promote_type(T1,T2)}
2326

2427
# 1d
2528
A = reinterpret(MyPair{Float64}, rand(2, 10), (10,))

0 commit comments

Comments
 (0)