cmd/compile: unused variables not detected when captured by a closure #45054
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
This snippet compiles:
What did you expect to see?
It should not compile because
a
andb
are unused variables.The compiler accepts it silently while
go vet
correctly reports an error.The text was updated successfully, but these errors were encountered: