Skip to content

Commit 09a86d0

Browse files
committed
Fix index_sizes(s::Size, inds...) for s shorter than inds
1 parent bfe0273 commit 09a86d0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/indexing.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ end
5454

5555
@pure tail(::Type{Size{S}}) where {S} = Size{Base.tail(S)}
5656
@inline tail(::S) where {S<:Size} = tail(S)()
57+
@inline tail(s::Size{()}) = s
5758

5859
@inline index_sizes(s::Size) = ()
5960
@inline index_sizes(s::Size, ::Int, inds...) = (Size(), index_sizes(tail(s), inds...)...)

0 commit comments

Comments
 (0)