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

cmd/compile: unknown struct field error should point to key #12110

Closed
dsymonds opened this issue Aug 11, 2015 · 1 comment
Closed

cmd/compile: unknown struct field error should point to key #12110

dsymonds opened this issue Aug 11, 2015 · 1 comment

Comments

@dsymonds
Copy link
Contributor

Here's a demo program: http://play.golang.org/p/P_-S7aNsxW

The error message ("unknown S field 'baz' in struct literal") points to line 17, which has the closing brace for the value used for that unknown field. It would be much more useful to point to the "baz:" field tag on line 14.

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Aug 11, 2015
@ALTree
Copy link
Member

ALTree commented Apr 26, 2017

This is fixed on tip, the error now points to line 14:

$ gotip build test.go
# command-line-arguments
./test.go:14:6: unknown field 'baz' in struct literal of type S

Closing.

@ALTree ALTree closed this as completed Apr 26, 2017
@golang golang locked and limited conversation to collaborators Apr 26, 2018
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