From 95f891953523fea7eb7fea3bc16efd9e867284a9 Mon Sep 17 00:00:00 2001 From: Chad Scherrer Date: Tue, 8 Feb 2022 13:55:42 -0800 Subject: [PATCH 1/3] oneto --- src/int.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/int.jl b/src/int.jl index b9110b2..534be77 100644 --- a/src/int.jl +++ b/src/int.jl @@ -138,3 +138,4 @@ Base.UnitRange(start::StaticInt, stop) = UnitRange(Int(start), stop) Base.UnitRange(start, stop::StaticInt) = UnitRange(start, Int(stop)) Base.UnitRange(start::StaticInt, stop::StaticInt) = UnitRange(Int(start), Int(stop)) +Base.eltype(::Base.OneTo{StaticInt{N}}) where {N} = Int \ No newline at end of file From d024b81ded73eb4334ba1364452cd75ac671ac9d Mon Sep 17 00:00:00 2001 From: Chad Scherrer Date: Tue, 8 Feb 2022 13:56:40 -0800 Subject: [PATCH 2/3] end file with newline --- src/int.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/int.jl b/src/int.jl index 534be77..fdbcbde 100644 --- a/src/int.jl +++ b/src/int.jl @@ -138,4 +138,4 @@ Base.UnitRange(start::StaticInt, stop) = UnitRange(Int(start), stop) Base.UnitRange(start, stop::StaticInt) = UnitRange(start, Int(stop)) Base.UnitRange(start::StaticInt, stop::StaticInt) = UnitRange(Int(start), Int(stop)) -Base.eltype(::Base.OneTo{StaticInt{N}}) where {N} = Int \ No newline at end of file +Base.eltype(::Base.OneTo{StaticInt{N}}) where {N} = Int From 4d4030d8d56193faceaaf63d01512381213671cb Mon Sep 17 00:00:00 2001 From: Chad Scherrer Date: Tue, 8 Feb 2022 14:00:35 -0800 Subject: [PATCH 3/3] add test --- test/runtests.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index 6c1408e..57850b0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -79,6 +79,8 @@ using Test @test static(Int32(-18)) === static(-18) @test static(0xffffffef) === static(4294967279) end + + @test collect(Base.OneTo(static(3))) == collect(Base.OneTo(3)) end @testset "StaticBool" begin