seen: check for explicit tables on dotted keys (#639)
The TOML spec is being clarified to say that dotted keys "define" their intermediate tables. Therefore the seen tracker needs to verify that none of them reference an explicit table. Also added a missing seen expression check for key-values parsed as part of a table section. See https://github.com/toml-lang/toml/issues/846
This commit is contained in:
@@ -516,6 +516,11 @@ func (d *decoder) handleKeyValues(v reflect.Value) (reflect.Value, error) {
|
||||
break
|
||||
}
|
||||
|
||||
err := d.seen.CheckExpression(expr)
|
||||
if err != nil {
|
||||
return reflect.Value{}, err
|
||||
}
|
||||
|
||||
x, err := d.handleKeyValue(expr, v)
|
||||
if err != nil {
|
||||
return reflect.Value{}, err
|
||||
|
||||
Reference in New Issue
Block a user