aboutsummaryrefslogtreecommitdiff
path: root/test/func5.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-09-14 13:09:53 -0700
committerRob Pike <r@golang.org>2009-09-14 13:09:53 -0700
commit5e11bb259b945f7e7fa60cb87dd6d17b98e6d8da (patch)
tree84bd832e7c8d88cedbf9b00a549fc586e914df25 /test/func5.go
parenta5d6f8342cee0fb0f4da1f5223cedcbeb2c160c6 (diff)
downloadgo-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.go12
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();
}