From: Rob Pike Date: Mon, 14 Sep 2009 20:09:53 +0000 (-0700) Subject: add tests for the func()() case X-Git-Tag: weekly.2009-11-06~590 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5e11bb259b945f7e7fa60cb87dd6d17b98e6d8da;p=gostls13.git add tests for the func()() case R=gri DELTA=12 (12 added, 0 deleted, 0 changed) OCL=34601 CL=34601 --- 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(); }