Skip to content

Commit

Permalink
Prevent TOML invalidation by pirates of T[elements...]
Browse files Browse the repository at this point in the history
StaticArrays (perhaps among others) semi-pirates this method,
although they've worked hard to make it pretty innocuous.
Still, there are times when it invalidates the TOML-reading,
so best to protect this.
  • Loading branch information
timholy committed Jan 14, 2021
1 parent eb567b2 commit 904fa74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/toml_parser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,9 @@ function push!!(v::Vector, el)
push!(v, el::T)
return v
elseif T === Union{}
return t[el]
out = Vector{t}(undef, 1)
out[1] = el
return out
else
if typeof(T) === Union
newT = Any
Expand Down

0 comments on commit 904fa74

Please sign in to comment.