diff options
author | Rob Pike <r@golang.org> | 2009-09-14 13:09:53 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2009-09-14 13:09:53 -0700 |
commit | 5e11bb259b945f7e7fa60cb87dd6d17b98e6d8da (patch) | |
tree | 84bd832e7c8d88cedbf9b00a549fc586e914df25 /test/func5.go | |
parent | a5d6f8342cee0fb0f4da1f5223cedcbeb2c160c6 (diff) | |
download | go-5e11bb259b945f7e7fa60cb87dd6d17b98e6d8da.tar.gz go-5e11bb259b945f7e7fa60cb87dd6d17b98e6d8da.zip |
add tests for the func()() case
R=gri
DELTA=12 (12 added, 0 deleted, 0 changed)
OCL=34601
CL=34601
Diffstat (limited to 'test/func5.go')
-rw-r--r-- | test/func5.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/func5.go b/test/func5.go index 556d94d291..033aa0e3ff 100644 --- a/test/func5.go +++ b/test/func5.go @@ -52,6 +52,11 @@ func three(x int) { var notmain func() +func emptyresults() () {} +func noresults() {} + +var nothing func() + func main() { three(call(add, 1, 2)); three(call1(add, 1, 2)); @@ -73,5 +78,12 @@ func main() { three(<-c); go func(a, b int, c chan int){c <- a+b}(1, 2, c); three(<-c); + + emptyresults(); + noresults(); + nothing = emptyresults; + nothing(); + nothing = noresults; + nothing(); } |