Skip to content

Commit d1e74ff

Browse files
committed
Fix BlockIndex() constructors
1 parent 81cbb08 commit d1e74ff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/blockindices.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,12 @@ struct BlockIndex{N,TI<:Tuple{Vararg{Integer,N}},Tα<:Tuple{Vararg{Integer,N}}}
147147
end
148148

149149
@inline BlockIndex(a::NTuple{N,Block{1}}, b::Tuple) where N = BlockIndex(Int.(a), b)
150+
@inline BlockIndex(::Tuple{}, b::Tuple{}) = BlockIndex{0,Tuple{},Tuple{}}((), ())
150151

151152
@inline BlockIndex(a::Integer, b::Integer) = BlockIndex((a,), (b,))
152153
@inline BlockIndex(a::Tuple, b::Integer) = BlockIndex(a, (b,))
153154
@inline BlockIndex(a::Integer, b::Tuple) = BlockIndex((a,), b)
154-
@inline BlockIndex(::Tuple{}, b::Tuple{}) = BlockIndex{0,Tuple{},Tuple{}}((), ())
155+
@inline BlockIndex() = BlockIndex((), ())
155156

156157
@inline BlockIndex(a::Block, b::Tuple) = BlockIndex(a.n, b)
157158
@inline BlockIndex(a::Block, b::Integer) = BlockIndex(a, (b,))

0 commit comments

Comments
 (0)