-
-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
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
Deserializing internally tagged enum: error line information inaccurate #1621
Comments
Determined it has nothing to do with flatten. It is internal tagging only that triggers the issue. Event simpler example:
Output:
|
It looks to be due to the use of the |
Line/column-numbering is format-specific functionality, so I think this ends up being a duplicate of #1183. |
When deserializing a internally tagged enum, everything works as expected when the input is correct, however:
If an error occurs while deserializing "inside" the internally tagged enum, the error line information points to the wrong place.
Note, simpler way to trigger bug in comments section.
Example code:
The result of running this code:
Problem:
Line information is incorrect.
Actual behavior:
error line refers to end of outermost struct: line 5
Expected behavior:
error line refers to the exact line where the parse error occurred: line 3
The text was updated successfully, but these errors were encountered: