From: Russ Cox Date: Sat, 9 Feb 2013 19:46:55 +0000 (-0500) Subject: spec: clarify that f(g()) requires that g return >= 1 value X-Git-Tag: go1.1rc2~1091 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1b3083e68d2c9b93fe6ecaa1758dbf5e214e6784;p=gostls13.git spec: clarify that f(g()) requires that g return >= 1 value Fixes #4573. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7322043 --- diff --git a/doc/go_spec.html b/doc/go_spec.html index b8502bd5a7..30c9a9766c 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -2765,13 +2765,14 @@ causes a run-time panic.

-As a special case, if the return parameters of a function or method +As a special case, if the return values of a function or method g are equal in number and individually assignable to the parameters of another function or method f, then the call f(g(parameters_of_g)) will invoke f after binding the return values of g to the parameters of f in order. The call -of f must contain no parameters other than the call of g. +of f must contain no parameters other than the call of g, +and g must have at least one return value. If f has a final ... parameter, it is assigned the return values of g that remain after assignment of regular parameters.