diff options
author | Russ Cox <rsc@golang.org> | 2010-12-13 16:51:19 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-12-13 16:51:19 -0500 |
commit | 1b31c37428d48ab3e5e4b86a6851293418fbf328 (patch) | |
tree | 2f6f01f7da90bb4ee32f8466d8aea0ee0bacfd28 /test/closure.go | |
parent | dc9a3b2791feb3aade3b8cf00891eddcb5b5ed90 (diff) | |
download | go-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.go | 11 |
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()) { } |