1
0
mirror of https://github.com/golang/go synced 2024-11-24 21:10:04 -07:00

spec: document that built-ins cannot be used as func values

R=gri
CC=golang-dev
https://golang.org/cl/164088
This commit is contained in:
Russ Cox 2009-12-04 10:23:12 -08:00
parent 609eeee817
commit 2a5f0c67ca

View File

@ -4099,6 +4099,12 @@ They are called like any other function but some of them
accept a type instead of an expression as the first argument. accept a type instead of an expression as the first argument.
</p> </p>
<p>
The built-in functions do not have standard Go types,
so they can only appear in <a href="#Calls">call expressions</a>;
they cannot be used as function values.
</p>
<pre class="ebnf"> <pre class="ebnf">
BuiltinCall = identifier "(" [ BuiltinArgs ] ")" . BuiltinCall = identifier "(" [ BuiltinArgs ] ")" .
BuiltinArgs = Type [ "," ExpressionList ] | ExpressionList . BuiltinArgs = Type [ "," ExpressionList ] | ExpressionList .