Skip to content

Commit 015301a

Browse files
authored
avoid some invalidations from untyped dict code in TOML print (#48908)
1 parent a70bbdf commit 015301a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/TOML/src/print.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ function print_table(f::MbyFunc, io::IO, a::AbstractDict,
171171
end
172172
if is_table(value)
173173
push!(ks, String(key))
174-
header = isempty(value) || !all(is_tabular(v) for v in values(value))::Bool
174+
_values = @invokelatest values(value)
175+
header = isempty(value) || !all(is_tabular(v) for v in _values)::Bool
175176
if header
176177
# print table
177178
first_block || println(io)

0 commit comments

Comments
 (0)