diff --git a/test/ranges.jl b/test/ranges.jl index dba2e8b24983c..272cee9c50e39 100644 --- a/test/ranges.jl +++ b/test/ranges.jl @@ -1413,6 +1413,13 @@ end @test Base.Slice(1:10)[Int8(2)] == Int8(2) end +@testset "Issue #30006" begin + @test Base.Slice(Base.OneTo(5))[Int32(1)] == Int32(1) + @test Base.Slice(Base.OneTo(3))[Int8(2)] == Int8(2) + @test Base.Slice(1:10)[Int32(2)] == Int32(2) + @test Base.Slice(1:10)[Int8(2)] == Int8(2) +end + @testset "allocation of TwicePrecision call" begin 0:286.493442:360 0:286:360