We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Two inputs with duplicate keys give invalid or odd results:
Given a={}\na={}, gotoml-test-decoder returns:
a={}\na={}
gotoml-test-decoder
{ "a": {} }
Given a=1\na=2, gotoml-test-decoder returns:
a=1\na=2
Error decoding TOML: toml: expected a to be a table, not a value
To Reproduce https://play.golang.org/p/Z3TgOrkhs5B
toml.Unmarshal([]byte("a={}\na={}"), &v)
https://play.golang.org/p/J59RodyIGaf
toml.Unmarshal([]byte("a=1\na=2"), &v)
Expected behavior In both cases, I expected to see an error about duplicate keys in the "root" table.
While we get an error with the second input, the error is confusing.
Versions
Additional context Found while doing differential fuzzing against BurnstSushi.
The text was updated successfully, but these errors were encountered:
Should be fixed by 4dff8ea. Filed #668 to provide better errors for duplicates tracking.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Two inputs with duplicate keys give invalid or odd results:
Given
a={}\na={}
,gotoml-test-decoder
returns:Given
a=1\na=2
,gotoml-test-decoder
returns:To Reproduce
https://play.golang.org/p/Z3TgOrkhs5B
https://play.golang.org/p/J59RodyIGaf
Expected behavior
In both cases, I expected to see an error about duplicate keys in the "root" table.
While we get an error with the second input, the error is confusing.
Versions
Additional context
Found while doing differential fuzzing against BurnstSushi.
The text was updated successfully, but these errors were encountered: