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 | a47a5b291f0eab5fb85d061f8e433b3dbbf862be (patch) | |
tree | 84bd832e7c8d88cedbf9b00a549fc586e914df25 | |
parent | 3cf32c8e2e2dce0ef32d3977810966dc11a94056 (diff) | |
download | go-a47a5b291f0eab5fb85d061f8e433b3dbbf862be.tar.gz |
add tests for the func()() case
R=gri
DELTA=12 (12 added, 0 deleted, 0 changed)
OCL=34601
CL=34601
-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 556d94d29..033aa0e3f 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(); } |