Commit 4a175682 authored by Robert Griesemer's avatar Robert Griesemer

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/3541Reviewed-by: default avatarAlan Donovan <adonovan@google.com>
parent 27aed3ce
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment