File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,23 @@ https://github.com/JuliaDiffEq/RecursiveArrayTools.jl/issues/19.
71
71
"""
72
72
ismutable (x) = ismutable (typeof (x))
73
73
74
- ismutable (:: Type{<:AbstractArray} ) = true
74
+ function ismutable (:: Type{T} ) where {T<: AbstractArray }
75
+ if parent_type (T) <: T
76
+ return true
77
+ else
78
+ return ismutable (parent_type (T))
79
+ end
80
+ end
75
81
ismutable (:: Type{<:AbstractRange} ) = false
76
82
ismutable (:: Type{<:AbstractDict} ) = true
77
83
ismutable (:: Type{<:Base.ImmutableDict} ) = false
78
- ismutable (:: Type{T} ) where {T} = T. mutable
84
+ function ismutable (:: Type{T} ) where {T}
85
+ if parent_type (T) <: T
86
+ return T. mutable
87
+ else
88
+ return ismutable (parent_type (T))
89
+ end
90
+ end
79
91
80
92
# Piracy
81
93
function Base. setindex (x:: AbstractArray ,v,i... )
You can’t perform that action at this time.
0 commit comments