Skip to content

Commit

Permalink
Function signature relaxed for getindex(A::Array, I::UnitRange{Int})
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjibansg committed Mar 3, 2021
1 parent 79d7683 commit f965d93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f965d93

Please sign in to comment.