Skip to content

Commit c2223ef

Browse files
committed
https://github.com/JuliaLang/julia/pull/52312
1 parent 6a63fde commit c2223ef

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/PTYQoL.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,13 @@ import Base: ==
6161
import Base: getproperty, Fix2
6262
getproperty(x) = Fix2(getproperty, x)
6363

64+
# https://github.com/JuliaLang/julia/pull/52312
65+
import Base: first, last, lastindex, front, tail, getindex
66+
first(A::CartesianIndex) = first(Tuple(A))
67+
last(A::CartesianIndex) = last(Tuple(A))
68+
lastindex(A::CartesianIndex) = lastindex(Tuple(A))
69+
front(A::CartesianIndex) = CartesianIndex(front(Tuple(A)))
70+
tail(A::CartesianIndex) = CartesianIndex(tail(Tuple(A)))
71+
getindex(A::CartesianIndex, i) = CartesianIndex(Tuple(A)[i])
72+
6473
end

0 commit comments

Comments
 (0)