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

encoding/json: Bug with anonymous struct fields #5245

Closed
AlekSi opened this issue Apr 9, 2013 · 5 comments
Closed

encoding/json: Bug with anonymous struct fields #5245

AlekSi opened this issue Apr 9, 2013 · 5 comments
Milestone

Comments

@AlekSi
Copy link
Contributor

AlekSi commented Apr 9, 2013

What steps will reproduce the problem?
Run this program with Go from tip: http://play.golang.org/p/mwOdp6ONTm

What is the expected output?
{"S":"B"} (as in Go 1.0, also matches v.S)

What do you see instead?
{}
@AlekSi
Copy link
Contributor Author

AlekSi commented Apr 9, 2013

Comment 1:

Same problem with unmarshal: http://play.golang.org/p/MeynbK3nGT

@robpike
Copy link
Contributor

robpike commented Apr 9, 2013

Comment 2:

This looks like a bad regression

Labels changed: added priority-soon, go1.1, removed priority-triage.

Status changed to Accepted.

@robpike
Copy link
Contributor

robpike commented Apr 9, 2013

Comment 3:

The code at the end of typefields is mistakenly killing off both fields because it
thinks there's a collision on S

@robpike
Copy link
Contributor

robpike commented Apr 9, 2013

Comment 4:

Labels changed: added priority-asap, removed priority-soon.

Status changed to Started.

@robpike
Copy link
Contributor

robpike commented Apr 9, 2013

Comment 5:

This issue was closed by revision 357e37d.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants