Skip to content

Commit a563216

Browse files
authored
Merge pull request #233 from JuliaArrays/fixLazyAxisLength
parent(::LazyAxis) returns the axis.
2 parents 8c2b84f + 51fd1da commit a563216

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/axes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ known_length(::Type{LazyAxis{N,P}}) where {N,P} = known_size(P, static(N))
233233
known_length(::Type{LazyAxis{:,P}}) where {P} = known_length(P)
234234
@inline function Base.length(x::LazyAxis{N})::Int where {N}
235235
if known_length(x) === nothing
236-
return size(parent(x), static(N))
236+
return size(getfield(x, :parent), static(N))
237237
else
238238
return known_length(x)
239239
end

0 commit comments

Comments
 (0)