We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hit "Format" on http://play.golang.org/p/QX0D-qyFwJ
package main type T struct { a, int }
Result: "prog.go:4:2: expected anonymous field"
The text was updated successfully, but these errors were encountered:
the error produced by gc is not good either. main.go:4: syntax error: unexpected semicolon or newline
it took me some time to understand why it's complaining about the newline (it treats int as a field name, and expects a type)
I think it's pretty hard to generate good diagnostics for this case due to the ambiguity (it could be a missing field name or a missing type name).
Sorry, something went wrong.
btw, Run says: main.go:4: syntax error: unexpected semicolon or newline
Run
main.go:4: syntax error: unexpected semicolon or newline
True, although an error message saying "missing field name or type name" would be better than what we've got.
Not urgent, by any means.
For the record, gccgo says
foo.go:4:11: error: expected type
No branches or pull requests
Hit "Format" on http://play.golang.org/p/QX0D-qyFwJ
Result: "prog.go:4:2: expected anonymous field"
The text was updated successfully, but these errors were encountered: