Skip to content

Commit e9189f3

Browse files
committed
Make MArray stay mutable
1 parent db98a1a commit e9189f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/abstractarray.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ similar_type(::Type{A},::Type{T},s::Size{S}) where {A<:AbstractArray,T,S} = defa
7878
default_similar_type(::Type{T}, s::Size{S}, ::Type{Val{D}}) where {T,S,D} = SArray{Tuple{S...},T,D,prod(s)}
7979

8080

81-
# should mutable things stay mutable?
82-
#similar_type{SA<:Union{MVector,MMatrix,MArray},T,S}(::Type{SA},::Type{T},s::Size{S}) = mutable_similar_type(T,s,length_val(s))
81+
# should mutable things stay mutable? yes
82+
similar_type(::Type{SA},::Type{T},s::Size{S}) where {SA<:Union{MVector,MMatrix,MArray},T,S} = mutable_similar_type(T,s,length_val(s))
8383

8484
mutable_similar_type(::Type{T}, s::Size{S}, ::Type{Val{D}}) where {T,S,D} = MArray{Tuple{S...},T,D,prod(s)}
8585

0 commit comments

Comments
 (0)