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
Please answer these questions before submitting your issue. Thanks!
go version
go version go1.7.3 linux/amd64
package main func main() { var _ = struct{}{} // ok _ = struct{ a int }{ a: 1, // ok } var _ = struct{ a int }{ a: 1, // cannot use _ as value } }
compile ok
compile error
The text was updated successfully, but these errors were encountered:
I just googled this problem and found a similar issue: #15481
A summary:
package main func main() { var _ = struct{a int}{} var _ = [5]int{} var _ = map[string]int{} _ = struct{a int}{1} _ = [5]int{1} _ = map[string]int{"a": 1} _ = struct {a int}{a: 1} var _ = struct {}{} var _ = []int{1} // aboves are all ok // belows are all errors var _ = struct{a int}{1} var _ = map[string]int{"a": 1} var _ = [5]int{1} var _ = struct {a int}{a: 1} }
Sorry, something went wrong.
Duplicate of #15481.
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7.3 linux/amd64
What did you do?
What did you expect to see?
compile ok
What did you see instead?
compile error
The text was updated successfully, but these errors were encountered: