diff --git a/tests/invalid/table/injection-1.toml b/tests/invalid/table/injection-1.toml index 3b84134..0b5b4bb 100644 --- a/tests/invalid/table/injection-1.toml +++ b/tests/invalid/table/injection-1.toml @@ -1,6 +1,17 @@ +# First a.b.c defines a table: a.b.c = {z=9} +# +# Then we define a.b.c.t = "str" to add a str to the above table, making it: +# +# a.b.c = {z=9, t="..."} +# +# While this makes sense, logically, it was decided this is not valid TOML as +# it's too confusing/convoluted. +# +# See: https://github.com/toml-lang/toml/issues/846 +# https://github.com/toml-lang/toml/pull/859 + [a.b.c] z = 9 + [a] b.c.t = "Using dotted keys to add to [a.b.c] after explicitly defining it above is not allowed" - -# see https://github.com/toml-lang/toml/issues/846 diff --git a/tests/invalid/table/injection-2.toml b/tests/invalid/table/injection-2.toml index f8cce95..3f0a011 100644 --- a/tests/invalid/table/injection-2.toml +++ b/tests/invalid/table/injection-2.toml @@ -1,6 +1,8 @@ +# This is the same issue as in injection-1.toml, except that nests one level +# deeper. See that file for a more complete description. + [a.b.c.d] z = 9 + [a] b.c.d.k.t = "Using dotted keys to add to [a.b.c.d] after explicitly defining it above is not allowed" - -# see https://github.com/toml-lang/toml/issues/846