File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 6767`IntType` is a union of `Int` and `StaticInt`. As a function, it ensures that `x` one of the
6868two.
6969"""
70- const IntType = Union{StaticInt,Int}
70+ const IntType = Union{StaticInt, Int}
7171IntType (x:: Integer ) = Int (x)
72- IntType (@nospecialize x:: Union{Int,StaticInt} ) = x
72+ IntType (@nospecialize x:: Union{Int, StaticInt} ) = x
7373
7474include (" float.jl" )
7575
Original file line number Diff line number Diff line change 7676 @test iterate (static (2 ): static (5 ), 5 ) === nothing
7777 @test iterate (static (1 ): static (2 ): static (9 ), 1 ) === (3 , 3 )
7878 @test iterate (static (1 ): static (2 ): static (9 ), 9 ) === nothing
79+ # make sure single length ranges work correctly
80+ @test iterate (static (2 ): static (3 ): static (2 ))[1 ] === 2 ===
81+ (static (2 ): static (3 ): static (2 ))[1 ]
82+ @test iterate (static (2 ): static (3 ): static (2 ), 2 ) === nothing
7983end
8084
8185# CartesianIndices
You can’t perform that action at this time.
0 commit comments