@@ -76,14 +76,14 @@ coefficient(f::Fun,::Colon) = coefficient(f,1:dimension(space(f)))
7676
7777
7878convert (:: 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))
8080function 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)))
8282 Fun {S,T,VT} (g. space, g. coefficients)
8383end
8484
8585function 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)
8787 Fun {S, T, typeof(coeff)} (f. space, coeff)
8888end
8989
@@ -92,11 +92,11 @@ convert(::Type{VFun{S,T}},x::Number) where {T,S} =
9292 (x== 0 ? zeros (T,S (AnyDomain ())) : x* ones (T,S (AnyDomain ()))):: VFun{S,T}
9393convert (:: Type{Fun{S}} ,x:: Number ) where {S} =
9494 (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))
9696
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)
100100
101101# if we are promoting, we need to change to a VFun
102102Base. promote_rule (:: Type{Fun{S,T,VT1}} ,:: Type{Fun{S,V,VT2}} ) where {T,V,S,VT1,VT2} =
0 commit comments