-
Notifications
You must be signed in to change notification settings - Fork 88
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
ryml accepts setting a VAL node to a MAP node without removing val or triggering error #31
Comments
@cburgard can you provide a minimal example which triggers this? |
Hi! Sure, here you go.
Now when moving it to an MWE, I can clearly see that the problem is related to setting the content of a node |
Thanks, this helps! ryml should trigger an error, but it doesn't: auto mu = plist.append_child();
mu << "mu"; // 1. this sets (or should set) mu as a VAL element
mu |= ryml::MAP; // 2. then this will make it a MAP, all the while allowing it to remain a VAL.
mu["value"] << 1; // 3. this is OK, given the previous line
//... So this is a bug: the error should be triggered on 2. |
the document was written with rapidyaml. So irrespective of whether it's valid YAML or not, I'd hope it would at least be able to parse back what it emitted :-)
Originally posted by @cburgard in #28 (comment)
The text was updated successfully, but these errors were encountered: