diff --git a/base/genericmemory.jl b/base/genericmemory.jl index 32c15a22e0db1..9c79ab95179b4 100644 --- a/base/genericmemory.jl +++ b/base/genericmemory.jl @@ -335,7 +335,7 @@ end isempty(inds) && return T[] # needed to allow view(Memory{T}(undef, 0), 2:1) @boundscheck checkbounds(m, inds) ref = memoryref(m, first(inds)) # @inbounds would be safe here but does not help performance. - dims = (Int(length(inds)),) + dims = (length(inds),) $(Expr(:new, :(Array{T, 1}), :ref, :dims)) end end diff --git a/test/arrayops.jl b/test/arrayops.jl index f4bb2dc7372f8..9b0eb7069d890 100644 --- a/test/arrayops.jl +++ b/test/arrayops.jl @@ -3238,9 +3238,6 @@ end @test @inferred(view(mem, :))::Vector{Int} == mem @test @inferred(reshape(mem, 5, 2))::Matrix{Int} == reshape(11:20, 5, 2) - # 53990 - @test @inferred(view(mem, unsigned(1):10))::Vector{Int} == 11:20 - empty_mem = Memory{Module}(undef, 0) @test_throws BoundsError view(empty_mem, 0:1) @test_throws BoundsError view(empty_mem, 1:2) diff --git a/test/core.jl b/test/core.jl index 3a3f6e6d1b6cd..e765d5a2ab7d7 100644 --- a/test/core.jl +++ b/test/core.jl @@ -5532,9 +5532,6 @@ let a = Base.StringVector(2^17) @test sizeof(c) == 0 end -# issue #53990 / https://github.com/JuliaLang/julia/pull/53896#discussion_r1555087951 -@test Base.StringVector(UInt64(2)) isa Vector{UInt8} - @test_throws ArgumentError eltype(Bottom) # issue #16424, re-evaluating type definitions