Skip to content

Commit 4808eda

Browse files
committed
simplify definition of isimmutable
This seems to date from before the representation of tuple types was changed in v0.4.
1 parent 2cc82d2 commit 4808eda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/reflection.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ julia> isimmutable([1,2])
275275
false
276276
```
277277
"""
278-
isimmutable(@nospecialize(x)) = (@_pure_meta; (isa(x,Tuple) || !typeof(x).mutable))
278+
isimmutable(@nospecialize(x)) = (@_pure_meta; !typeof(x).mutable)
279+
279280
isstructtype(t::DataType) = (@_pure_meta; length(t.types) != 0 || (t.size==0 && !t.abstract))
280281
isstructtype(x) = (@_pure_meta; false)
281282

0 commit comments

Comments
 (0)