Skip to content

Commit 9310c5d

Browse files
committed
overload Base.setindex
1 parent f9e6577 commit 9310c5d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/deque.jl

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ end
7272

7373
# Immutable version of setindex!(). Seems similar in nature to the above, but
7474
# could also be justified to live in src/indexing.jl
75+
import Base: setindex
7576
@inline setindex(a::StaticArray, x, index::Int) = _setindex(Size(a), a, convert(eltype(typeof(a)), x), index)
7677
@generated function _setindex(::Size{s}, a::StaticArray{<:Any,T}, x::T, index::Int) where {s, T}
7778
exprs = [:(ifelse($i == index, x, a[$i])) for i = 1:s[1]]

0 commit comments

Comments
 (0)