Skip to content

Commit 3bd5aa6

Browse files
authored
Merge pull request #164 from JuliaArrays/ismutablejulia1.7
Fix ismutable for Julia 1.7
2 parents b91d803 + abb4359 commit 3bd5aa6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/ArrayInterface.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,15 @@ ismutable(::Type{<:Base.ImmutableDict}) = false
136136
ismutable(::Type{BigFloat}) = false
137137
ismutable(::Type{BigInt}) = false
138138
function ismutable(::Type{T}) where {T}
139-
if parent_type(T) <: T
140-
return T.mutable
139+
if parent_type(T) <: T
140+
if VERSION v"1.7.0-DEV.1208"
141+
return Base.ismutabletype(T)
141142
else
142-
return ismutable(parent_type(T))
143+
return T.mutable
143144
end
145+
else
146+
return ismutable(parent_type(T))
147+
end
144148
end
145149

146150
# Piracy

0 commit comments

Comments
 (0)