Skip to content

Commit bbcde0b

Browse files
committed
Weaken inference for SumSpace and friends
1 parent fedea57 commit bbcde0b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Spaces/ProductSpaceOperators.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ export continuity
55

66
for TYP in (:PiecewiseSpace,:ArraySpace)
77
@eval begin
8-
function promotedomainspace(A::InterlaceOperator{T,2},sp::$TYP) where T
8+
function promotedomainspace(A::InterlaceOperator{T,2},sp::$TYP)::Any where T
99
if domainspace(A) == sp
1010
return A
1111
end
1212
@assert size(A.ops,2) == length(sp)
1313
InterlaceOperator([promotedomainspace(A.ops[k,j],sp[j]) for k=1:size(A.ops,1),j=1:size(A.ops,2)],$TYP)
1414
end
15-
function interlace_choosedomainspace(ops,rs::$TYP)
15+
function interlace_choosedomainspace(ops,rs::$TYP)::Any
1616
@assert length(ops) == length(rs)
1717
# this ensures correct dispatch for unino
1818
sps = Array{Space}(
@@ -93,7 +93,7 @@ end
9393

9494
# Sum Space and PiecewiseSpace need to allow permutation of space orders
9595
for TYP in (:SumSpace,:PiecewiseSpace)
96-
@eval function Conversion(S1::$TYP,S2::$TYP)
96+
@eval function Conversion(S1::$TYP,S2::$TYP)::Any
9797
v1 = collect(S1.spaces)
9898
v2 = collect(S2.spaces)
9999

@@ -180,7 +180,7 @@ end
180180
for (OPrule,OP) in ((:conversion_rule,:conversion_type),(:maxspace_rule,:maxspace),
181181
(:union_rule,:union))
182182
for TYP in (:SumSpace,:PiecewiseSpace)
183-
@eval function $OPrule(S1sp::$TYP,S2sp::$TYP)
183+
@eval function $OPrule(S1sp::$TYP,S2sp::$TYP)::Any
184184
S1 = components(S1sp)
185185
S2 = components(S2sp)
186186
cs1,cs2=map(canonicalspace,S1),map(canonicalspace,S2)
@@ -239,7 +239,7 @@ for (Op,OpWrap) in ((:Derivative,:DerivativeWrapper),(:Integral,:IntegralWrapper
239239
end
240240
end
241241

242-
function Derivative(S::SumSpace,k::Integer)
242+
function Derivative(S::SumSpace,k::Integer)::Any
243243
# we want to map before we decompose, as the map may introduce
244244
# mixed bases.
245245
if typeof(canonicaldomain(S))==typeof(domain(S))

src/Spaces/SumSpace.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ end
182182

183183

184184
# avoids default ConstantSpace
185-
function union_rule(B::ConstantSpace,A::SumSpace)
185+
function union_rule(B::ConstantSpace,A::SumSpace)::Any
186186
if !domainscompatible(A,B)
187187
NoSpace()
188188
else
@@ -195,7 +195,7 @@ function union_rule(B::ConstantSpace,A::SumSpace)
195195
end
196196
end
197197

198-
function union_rule(A::SumSpace, B::Space)
198+
function union_rule(A::SumSpace, B::Space)::Any
199199
if !domainscompatible(A,B)
200200
NoSpace()
201201
else

0 commit comments

Comments
 (0)