summaryrefslogtreecommitdiff
path: root/test/closure.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-12-13 16:51:19 -0500
committerRuss Cox <rsc@golang.org>2010-12-13 16:51:19 -0500
commit6d363250db3f07f4cdc2ea147433bcc9c82d5527 (patch)
treec2c44195955866618c1d30e4fb78c8e012972e8f /test/closure.go
parent4711131f3e16d470e2b029f22647fabcd82c75b6 (diff)
downloadgo-6d363250db3f07f4cdc2ea147433bcc9c82d5527.tar.gz
gc: issue 1231
Fixes issue 1231. R=ken2 CC=golang-dev http://codereview.appspot.com/3627041
Diffstat (limited to 'test/closure.go')
-rw-r--r--test/closure.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/closure.go b/test/closure.go
index 54e4cf8ea..3033c02ed 100644
--- a/test/closure.go
+++ b/test/closure.go
@@ -98,4 +98,15 @@ func main() {
println("newfunc returned broken funcs")
panic("fail")
}
+
+ ff(1)
+}
+
+func ff(x int) {
+ call(func() {
+ _ = x
+ })
+}
+
+func call(func()) {
}