File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -120,12 +120,13 @@ function (ss::SummarySize)(obj::Array)
120
120
if ! haskey (ss. seen, datakey)
121
121
ss. seen[datakey] = true
122
122
dsize = Core. sizeof (obj)
123
- if isbitsunion (eltype (obj))
123
+ T = eltype (obj)
124
+ if isbitsunion (T)
124
125
# add 1 union selector byte for each element
125
126
dsize += length (obj)
126
127
end
127
128
size += dsize
128
- if ! isempty (obj) && ! Base. allocatedinline (eltype (obj ))
129
+ if ! isempty (obj) && ( ! Base. allocatedinline (T) || (T isa DataType && ! Base . datatype_pointerfree (T) ))
129
130
push! (ss. frontier_x, obj)
130
131
push! (ss. frontier_i, 1 )
131
132
end
Original file line number Diff line number Diff line change @@ -302,6 +302,11 @@ let vec = vcat(missing, ones(100000))
302
302
@test length (unique (summarysize (vec) for i = 1 : 20 )) == 1
303
303
end
304
304
305
+ # issue #40773
306
+ let s = Set (1 : 100 )
307
+ @test summarysize ([s]) > summarysize (s)
308
+ end
309
+
305
310
# issue #13021
306
311
let ex = try
307
312
Main. x13021 = 0
You can’t perform that action at this time.
0 commit comments