@@ -76,14 +76,14 @@ coefficient(f::Fun,::Colon) = coefficient(f,1:dimension(space(f)))
76
76
77
77
78
78
convert (:: Type{Fun{S,T,VT}} ,f:: Fun{S} ) where {T,S,VT} =
79
- Fun {S,T,VT} (f. space, convert (VT,f. coefficients):: VT )
79
+ Fun {S,T,VT} (f. space, strictconvert (VT,f. coefficients))
80
80
function convert (:: Type{Fun{S,T,VT}} ,f:: Fun ) where {T,S,VT}
81
- g = Fun (Fun (f. space, convert (VT,f. coefficients):: VT ), convert (S,space (f)):: S )
81
+ g = Fun (Fun (f. space, strictconvert (VT,f. coefficients)), strictconvert (S,space (f)))
82
82
Fun {S,T,VT} (g. space, g. coefficients)
83
83
end
84
84
85
85
function convert (:: Type{Fun{S,T}} ,f:: Fun{S} ) where {T,S}
86
- coeff = convert (AbstractVector{T},f. coefficients):: AbstractVector{T}
86
+ coeff = strictconvert (AbstractVector{T},f. coefficients)
87
87
Fun {S, T, typeof(coeff)} (f. space, coeff)
88
88
end
89
89
@@ -92,11 +92,11 @@ convert(::Type{VFun{S,T}},x::Number) where {T,S} =
92
92
(x== 0 ? zeros (T,S (AnyDomain ())) : x* ones (T,S (AnyDomain ()))):: VFun{S,T}
93
93
convert (:: Type{Fun{S}} ,x:: Number ) where {S} =
94
94
(x== 0 ? zeros (S (AnyDomain ())) : x* ones (S (AnyDomain ()))):: Fun{S}
95
- convert (:: Type{IF} ,x:: Number ) where {IF<: Fun } = convert (IF,Fun (x)):: IF
95
+ convert (:: Type{IF} ,x:: Number ) where {IF<: Fun } = strictconvert (IF,Fun (x))
96
96
97
- Fun {S,T,VT} (f:: Fun ) where {S,T,VT} = convert (Fun{S,T,VT}, f)
98
- Fun {S,T} (f:: Fun ) where {S,T} = convert (Fun{S,T}, f)
99
- Fun {S} (f:: Fun ) where {S} = convert (Fun{S}, f)
97
+ Fun {S,T,VT} (f:: Fun ) where {S,T,VT} = strictconvert (Fun{S,T,VT}, f)
98
+ Fun {S,T} (f:: Fun ) where {S,T} = strictconvert (Fun{S,T}, f)
99
+ Fun {S} (f:: Fun ) where {S} = strictconvert (Fun{S}, f)
100
100
101
101
# if we are promoting, we need to change to a VFun
102
102
Base. promote_rule (:: Type{Fun{S,T,VT1}} ,:: Type{Fun{S,V,VT2}} ) where {T,V,S,VT1,VT2} =
0 commit comments