diff --git a/src/readonly.jl b/src/readonly.jl index 00eacc3c..8031b91a 100644 --- a/src/readonly.jl +++ b/src/readonly.jl @@ -22,7 +22,7 @@ end Base.unsafe_convert(x::Type{Ptr{T}}, A::ReadOnly) where T = Base.unsafe_convert(x, parent(A)) Base.elsize(::Type{ReadOnly{T,N,V}}) where {T,N,V} = Base.elsize(V) -Base.@propagate_inbounds @inline Base.setindex!(x::ReadOnly, v, ind...) = if v == getindex(parent(x), ind...) +Base.@propagate_inbounds @inline Base.setindex!(x::ReadOnly, v, ind::Vararg{Integer}) = if v == getindex(parent(x), ind...) v else error("Can't change $(typeof(x)).")