-
Notifications
You must be signed in to change notification settings - Fork 18.1k
encoding/xml: Unmarshal panic when use generic #48318
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
Comments
This patch "fixes" the problem, but makes the parser out-of-spec, so I'm not sure we can do it.
We may just need to accept that generic types cannot be encoded into XML. Or we need a different naming scheme for generics in XML that uses approved punctuation. In any case, there's something to do here. The marshaler should return an error if the unmarshaler will return an error. @rsc from owners |
https://play.golang.org/p/OoUqANfbaSl shows what happens for an unnamed struct type: we get an unsupported type error. |
The docs say:
So there are four different preferred choices before we get to this one - plenty of ways to override the decision to chop at the [. |
Change https://golang.org/cl/349349 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: