Skip to content

Commit eed2dba

Browse files
authored
Typo fix. (JuliaLang#45333)
1 parent bad3e39 commit eed2dba

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

base/multidimensional.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ function copyto!(dest::AbstractArray{T1,N}, Rdest::CartesianIndices{N},
11191119
if @generated
11201120
quote
11211121
@nloops $N i (n->CRsrc.indices[n]) begin
1122-
@inbounds @nref($N,dest,n->Rdest.indices[n][i_n+ΔI[n]]) = @nref($N,src,n->Rsrc.indices[n][i_n])
1122+
@inbounds @nref($N,dest,n->Rdest.indices[n][i_n+ΔI[n]]) = @nref($N,src,n->Rsrc.indices[n][i_n])
11231123
end
11241124
end
11251125
else

test/copy.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ end
6767
@test all(iszero, B)
6868
end
6969
end
70+
let A = [reshape(1:6, 3, 2);;]
71+
copyto!(A, CartesianIndices((2:3,2)), A, CartesianIndices((2,2)))
72+
@test A[2:3,:] == [1 4;2 5]
73+
end
7074
end
7175

7276
@testset "shallow and deep copying" begin

0 commit comments

Comments
 (0)