From 9ccbe78aae7f49ee142fede428287f58071944eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Thi=C3=A9baut?= Date: Thu, 18 Feb 2021 09:25:38 +0100 Subject: [PATCH] Fix setindex! to return its first argument --- src/StructuredArrays.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/StructuredArrays.jl b/src/StructuredArrays.jl index 8d313e5..bfcdaca 100644 --- a/src/StructuredArrays.jl +++ b/src/StructuredArrays.jl @@ -300,16 +300,19 @@ end @boundscheck checkbounds(A, i) (i == length(A) == 1) || not_all_elements() A.val = x + A end @inline function Base.setindex!(A::MutableUniformArray, x, i::AbstractUnitRange{<:Integer}) (first(i) == 1 && last(i) == length(A)) || not_all_elements() A.val = x + A end @inline function Base.setindex!(A::MutableUniformArray, x, ::Colon) A.val = x + A end """