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:
parent
609eeee817
commit
2a5f0c67ca
@ -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 .
|
||||||
|
Loading…
Reference in New Issue
Block a user