You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[[a.b]]
name = "nick"
ishuman = true
[[a.b]]
name = "jack"
ishuman = false
Log
Unhandled exception. Tomlet.Exceptions.MissingIntermediateInTomlTableArraySpecException: Missing intermediate definition for a.b in table-array specification on line 1. This is undefined behavior, and I chose to define it as an error.
at Tomlet.TomlParser.ReadTableArrayStatement(TomletStringReader reader, TomlDocument document) in /_/Tomlet/TomlParser.cs:line 911
at Tomlet.TomlParser.Parse(String input) in /_/Tomlet/TomlParser.cs:line 65
at Tomlet.TomlParser.ParseFile(String filePath) in /_/Tomlet/TomlParser.cs:line 30
at Program.Main(String[] args)
Coming back to this, I'm not seeing anywhere in the TOML spec that actually says this is allowed, and they show many similar cases which are not allowed, so I'm not inclined to allow this behavior. There's a certain lack of clarity here - you're defining, essentially, an array b of name, ishuman on a table a, but you don't define a anywhere earlier, so it's ambiguous.
Activity
oldkingOK commentedon Mar 14, 2024
It works with test.toml:
While the TOML 1.0.0 specification allows us to ignore the parent node definition.
SamboyCoding commentedon May 6, 2024
Coming back to this, I'm not seeing anywhere in the TOML spec that actually says this is allowed, and they show many similar cases which are not allowed, so I'm not inclined to allow this behavior. There's a certain lack of clarity here - you're defining, essentially, an array
bofname, ishumanon a tablea, but you don't defineaanywhere earlier, so it's ambiguous.