aboutsummaryrefslogtreecommitdiff
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
commit1b31c37428d48ab3e5e4b86a6851293418fbf328 (patch)
tree2f6f01f7da90bb4ee32f8466d8aea0ee0bacfd28 /test/closure.go
parentdc9a3b2791feb3aade3b8cf00891eddcb5b5ed90 (diff)
downloadgo-1b31c37428d48ab3e5e4b86a6851293418fbf328.tar.gz
go-1b31c37428d48ab3e5e4b86a6851293418fbf328.zip
gc: issue 1231
Fixes #1231. R=ken2 CC=golang-dev https://golang.org/cl/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 54e4cf8eae..3033c02ed8 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()) {
}