summaryrefslogtreecommitdiff
path: root/test/closure2.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2015-01-29 14:18:52 -0800
committerRobert Griesemer <gri@golang.org>2015-01-29 22:22:14 +0000
commit4a1756824fb609952c884b4210421ca9e315e1c3 (patch)
treed2328935d350ee689ad9fc87e8cb2e8676261f6d /test/closure2.go
parent27aed3ce6898f3078f4ee52935c63a12aca86b9e (diff)
downloadgo-git-4a1756824fb609952c884b4210421ca9e315e1c3.tar.gz
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>
Diffstat (limited to 'test/closure2.go')
-rw-r--r--test/closure2.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/closure2.go b/test/closure2.go
index 785e3ae275..8947450561 100644
--- a/test/closure2.go
+++ b/test/closure2.go
@@ -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