Skip to content

Commit 7a58018

Browse files
committed
add eachindex(::OptionallyStaticUnitRange) tests
1 parent 984a0db commit 7a58018

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/ranges.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,8 @@
106106
@test ArrayInterface.static_step(Base.OneTo(one(UInt))) === static(1)
107107

108108
@test Base.setindex(1:5, [6,2], 1:2) == [6,2,3,4,5]
109+
110+
@test @inferred(eachindex(static(-7):static(-7))) === static(1):static(15)
111+
@test @inferred((static(-7):static(7))[first(eachindex(static(-7):static(7)))]) == -7
109112
end
110113

0 commit comments

Comments
 (0)