Skip to content

Commit cdc939b

Browse files
authored
fix 1.7 compat (#124)
1 parent ab9762c commit cdc939b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/AbstractPatterns/impl/RedyFlavoured.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ function init_cache(view_cache::ViewCache)
193193
end
194194
end
195195

196+
@static if !isdefined(Base, :ismutabletype)
197+
ismutabletype(x::Type) = x.mutable
198+
end
199+
196200
function myimpl()
197201
function cache(f)
198202
function apply(env::CompileEnv, target::Target{true})::Cond
@@ -212,7 +216,7 @@ function myimpl()
212216
if v isa Symbol
213217
v = QuoteNode(v)
214218
end
215-
(isprimitivetype(ty) || ty.size == 0 && !ty.mutable) ?
219+
(isprimitivetype(ty) || ty.size == 0 && !ismutabletype(ty)) ?
216220
CheckCond(:($(target.repr) === $v)) : CheckCond(:($(target.repr) == $v))
217221
end
218222

0 commit comments

Comments
 (0)