With this CL, the first ~500 errorcheck tests pass when running
go run run.go -v -G
in the $GOROOT/test directory (the log output includes a few dozen
tests that are currently skipped).
Change-Id: I9eaa2319fb39a090df54f8699ddc29ffe58b1bf1
Reviewed-on: https://go-review.googlesource.com/c/go/+/274975
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
I haven't looked at the source, but the gc compiler appears to
omit "not used" errors when there is an error in the
initializer. This is harder to do in gccgo, and frankly I
think the "not used" error is still useful even if the
initializer has a problem. This CL tweaks some tests to avoid
the error, which is not the point of these tests in any case.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5561059