fix(parser): reject an array-of-tables header extending a frozen inline table
Assisted-by: GLM 5.3
This commit is contained in:
@@ -487,6 +487,9 @@ func TestRejectsInlineTableExtension(t *testing.T) {
|
||||
"by header": "a = { b = 1 }\n[a.c]\nx = 2\n",
|
||||
"by dotted key": "a = { b = 1 }\na.c = 2\n",
|
||||
"header over it": "a = { b = 1 }\n[a]\nx = 2\n",
|
||||
// The frozen check must cover the intermediate steps of an array-of-tables
|
||||
// header, not only the leaf: [[a.b.c]] walks through a and a.b.
|
||||
"by nested array header": "a = { b = {} }\n[[a.b.c]]\nx = 2\n",
|
||||
}
|
||||
for name, doc := range cases {
|
||||
if _, err := Parse([]byte(doc)); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user