We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22efc20 commit dc105d3Copy full SHA for dc105d3
src/array.jl
@@ -49,16 +49,14 @@ end
49
# these are stored contiguously and require a selector array (handled by us)
50
# As well as "mutable singleton" types like `Symbol` that use pointer-identity
51
52
-function valid_leaftype(@nospecialize(T))
53
- Base.allocatedinline(T) || (Base.ismutabletype(T) && Base.datatype_fieldcount(T) == 0)
54
-end
55
-
56
function valid_type(@nospecialize(T))
57
- if valid_leaftype(T)
+ if Base.allocatedinline(T)
58
if hasfieldcount(T)
59
return all(valid_type, fieldtypes(T))
60
end
61
return true
+ elseif Base.ismutabletype(T)
+ return Base.datatype_fieldcount(T) == 0
62
63
return false
64
0 commit comments