-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bindnode: fix for stringjoin struct emission when first field is the …
…empty string. In the case of an empty string as the first field, the buffer length is not a valid proxy for whether we're on the first field or not. This means if we have some type like: `type Foo struct {a String; b String} representation stringjoin(":")`, and the value of it is `{"", "b"}`, then the string of that should still be ":b". Before this fix, it would incorrectly be emitted as "b" (no joiner), which would not round-trip. Includes regression test.
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters