xml encoding fails with C compiler error #23429
Labels
Bug
This tag is applied to issues which reports bugs.
Status: Confirmed
This bug has been confirmed to be valid by a contributor.
Unit: cgen
Bugs/feature requests, that are related to the default C generating backend.
Describe the bug
Converting a
xml.XMLNode
to a string fails with a C compiler error, when the node's children reference a string variable, like shown in the example. However, it works when the string is cloned.Reproduction Steps
The problem disappears, when the string is cloned instead:
Expected Behavior
The encoding should work without a call to
string.clone()
. This should be handled inside theencoding.xml
library.Current Behavior
The V compiler fails while building with the following message:
Possible Solution
The
pretty_str
function should handle necessary allocations/cloning of strings.Additional Information/Context
No response
V version
V 0.4.9 63f5f4a
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: