diff --git a/base/sharedarray.jl b/base/sharedarray.jl index 899d5f2214770..583aafd4002ab 100644 --- a/base/sharedarray.jl +++ b/base/sharedarray.jl @@ -280,9 +280,9 @@ end convert(::Type{Array}, S::SharedArray) = S.s # pass through getindex and setindex! - unlike DArrays, these always work on the complete array -getindex(S::SharedArray, I::Real) = getindex(S.s, I) +getindex(S::SharedArray, i...) = getindex(S.s, i...) -setindex!(S::SharedArray, x, I::Real) = setindex!(S.s, x, I) +setindex!(S::SharedArray, x, i...) = setindex!(S.s, x, i...) function fill!(S::SharedArray, v) vT = convert(eltype(S), v) diff --git a/test/parallel.jl b/test/parallel.jl index 8d316ba1a83cd..fc04e0214713a 100644 --- a/test/parallel.jl +++ b/test/parallel.jl @@ -97,6 +97,9 @@ for p in procs(d) @test d[idxl] == p end +d = SharedArray(Float64, (2,3)) +@test isa(d[:,2], Vector{Float64}) + ### SharedArrays from a file # Mapping an existing file