test/closure2.go: correctly "use" tmp

cmd/go doesn't complain (this is an open issue), but go/types does

Change-Id: I2caec1f7aec991a9500d2c3504c29e4ab718c138
Reviewed-on: https://go-review.googlesource.com/3541
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Robert Griesemer 2015-01-29 14:18:52 -08:00
parent 27aed3ce68
commit 4a1756824f

View file

@ -54,6 +54,7 @@ func main() {
}
func() {
tmp = w // force capture of w, but do not write to it yet
_ = tmp
func() {
func() {
w++ // write in a nested closure