Skip to content

Commit fdbba71

Browse files
committed
avoid some invalidations from untyped dict code in TOML print (#48908)
(cherry picked from commit 015301a)
1 parent e217a22 commit fdbba71

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
@@ -163,7 +163,8 @@ function print_table(f::MbyFunc, io::IO, a::AbstractDict,
163163
end
164164
if is_table(value)
165165
push!(ks, String(key))
166-
header = isempty(value) || !all(is_tabular(v) for v in values(value))::Bool
166+
_values = @invokelatest values(value)
167+
header = isempty(value) || !all(is_tabular(v) for v in _values)::Bool
167168
if header
168169
# print table
169170
first_block || println(io)

0 commit comments

Comments
 (0)