Skip to content
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

Incorrect type for repeated child elements when generating compact types #43

Open
meblum opened this issue Aug 26, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@meblum
Copy link
Contributor

meblum commented Aug 26, 2024

Running xmlstruct.WithCompactTypes(true) on <a><b><c></c><c></c></b></a> generates

type A struct {
        C struct{} `xml:"b>c"`
}

instead of

type A struct {
        C []struct{} `xml:"b>c"`
}

This was missed due to an incorrect test case on line 706 where struct{} should've been []struct{}.

"\tG struct{} `xml:\"f>g\"`",

@twpayne twpayne added the bug Something isn't working label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants