Skip to content

Commit b454bc9

Browse files
authored
Merge pull request #370 from jw3126/setindex
overload Base.setindex
2 parents f9e6577 + 9310c5d commit b454bc9

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)