]> Cypherpunks repositories - gostls13.git/commitdiff
spec: More precise wording in section on function calls.
authorDQNEO <dqneoo@gmail.com>
Wed, 10 Feb 2021 05:46:54 +0000 (14:46 +0900)
committerRobert Griesemer <gri@golang.org>
Thu, 11 Feb 2021 17:55:50 +0000 (17:55 +0000)
A caller is not always in a function.

For example, a call can appear in top level declarations.

e.g. var x = f()

Change-Id: I29c4c3b7663249434fb2b8a6d0003267c77268cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/290849
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Robert Griesemer <gri@golang.org>

doc/go_spec.html

index c9e14a3fec70b8762de6c1a9e6d0d80ad6c45fdc..59c9ce3c434e67614bf3e906f820a854e57b1f0b 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of Feb 2, 2021",
+       "Subtitle": "Version of Feb 10, 2021",
        "Path": "/ref/spec"
 }-->
 
@@ -3446,7 +3446,7 @@ In a function call, the function value and arguments are evaluated in
 After they are evaluated, the parameters of the call are passed by value to the function
 and the called function begins execution.
 The return parameters of the function are passed by value
-back to the calling function when the function returns.
+back to the caller when the function returns.
 </p>
 
 <p>