You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@alecthomas while making coverage for this in #213, I discovered this fix wasn't correct. 49f4822e#diff-5bc2d8471b75bfdf044ca005bc151f75b27c820ab857ef639ffe1124405c3c47R114 (nodes.go:114) - vals always has length 0 (no match) or 1 (match, will be the result of strct.Parse, a single struct value). There is no correlation between the indexes of vals and u.members. This fix ends up only looking at the first union option and makes either all the options pointers, or none.
To see the bug in action, try modifying TestParserWithUnion. In the participle.Union option, change AMember2{} to (*AMember2)(nil) - it changes nothing. Or make just AMember1 into a pointer - then it uses pointers for both of them.
https://go.dev/play/p/CWC44DlcCl5
The text was updated successfully, but these errors were encountered: