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
gc accepts the following snippet of code, but gccgo and go/types report that: "x declared but not used":
func myfunc() { var x int go func() { x = 3 }() }
gccgo and go/types are probably correct here. x is only ever assigned to, but never returned or used.
If I make x a return value, none of one of gc, gccgo, and go/types complain.
func myfunc() { var x int go func() int { x = 3 return x }() }
The text was updated successfully, but these errors were encountered:
Dup of #8560.
Sorry, something went wrong.
No branches or pull requests
gc accepts the following snippet of code, but gccgo and go/types report that: "x declared but not used":
gccgo and go/types are probably correct here. x is only ever assigned to, but never returned or used.
If I make x a return value, none of one of gc, gccgo, and go/types complain.
The text was updated successfully, but these errors were encountered: