Skip to content

More append-with-dotted-keys madness #190

@Akuli

Description

@Akuli

I wrote a TOML 1.1 parser that passes the test suite, but my parser behaves differently than tomli 2.4.0 which also passes the test suite.

Here's a minimal reproducer to trigger the bug (modified from invalid/table/append-with-dotted-keys-01.toml):

[a.b.c]
z = 9

[[totally_unrelated]]
x = 123

[a]
b.c.t = "this should NOT be allowed"

My parser --> valid
tomli 2.4.0 --> invalid

I think tomli is correct here and this should be considered invalid. The bug in my parser is that the code that handles array tables like [[totally_unrelated]] doesn't mark the old table as done when it switches to the new table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions