From f965d93172330576e517eff865ffc388e1df0521 Mon Sep 17 00:00:00 2001 From: Sanjiban Sengupta Date: Wed, 3 Mar 2021 13:14:13 +0530 Subject: [PATCH] Function signature relaxed for getindex(A::Array, I::UnitRange{Int}) --- base/array.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/array.jl b/base/array.jl index e680d035897be6..f79a6f30e92621 100644 --- a/base/array.jl +++ b/base/array.jl @@ -803,7 +803,7 @@ function getindex end @eval getindex(A::Array, i1::Int, i2::Int, I::Int...) = (@_inline_meta; arrayref($(Expr(:boundscheck)), A, i1, i2, I...)) # Faster contiguous indexing using copyto! for UnitRange and Colon -function getindex(A::Array, I::UnitRange{Int}) +function getindex(A::Array, I::AbstractUnitRange{<:Integer}) @_inline_meta @boundscheck checkbounds(A, I) lI = length(I)