Skip to content

Commit 6aba3b2

Browse files
author
KristofferC
committed
Revert "Test and fix non-int-length bug in view(::Memory, ::Union{UnitRange, Base.OneTo}) (#53991)"
This reverts commit eb96c07.
1 parent 8bdf1fa commit 6aba3b2

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

base/genericmemory.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ end
330330
isempty(inds) && return T[] # needed to allow view(Memory{T}(undef, 0), 2:1)
331331
@boundscheck checkbounds(m, inds)
332332
ref = MemoryRef(m, first(inds)) # @inbounds would be safe here but does not help performance.
333-
dims = (Int(length(inds)),)
333+
dims = (length(inds),)
334334
$(Expr(:new, :(Array{T, 1}), :ref, :dims))
335335
end
336336
end

test/arrayops.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3206,9 +3206,6 @@ end
32063206
@test @inferred(view(mem, :))::Vector{Int} == mem
32073207
@test @inferred(reshape(mem, 5, 2))::Matrix{Int} == reshape(11:20, 5, 2)
32083208

3209-
# 53990
3210-
@test @inferred(view(mem, unsigned(1):10))::Vector{Int} == 11:20
3211-
32123209
empty_mem = Memory{Module}(undef, 0)
32133210
@test_throws BoundsError view(empty_mem, 0:1)
32143211
@test_throws BoundsError view(empty_mem, 1:2)

test/core.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5524,9 +5524,6 @@ let a = Base.StringVector(2^17)
55245524
@test sizeof(c) == 0
55255525
end
55265526

5527-
# issue #53990 / https://github.com/JuliaLang/julia/pull/53896#discussion_r1555087951
5528-
@test Base.StringVector(UInt64(2)) isa Vector{UInt8}
5529-
55305527
@test_throws ArgumentError eltype(Bottom)
55315528

55325529
# issue #16424, re-evaluating type definitions

0 commit comments

Comments
 (0)