Descriptionspec: permit parentheses around builtin function names
Not a language change.
This is simply documenting the status quo which permits
builtin function names to be parenthesized in calls; e.g.,
both
len(s)
and
(((len)))(s)
are accepted by all compilers and go/types.
Changed the grammar by merging the details of BuiltinCall
with ordinary Calls. Also renamed the Call production to
Arguments which more clearly identifies that part of the
grammar and also matches better with its counterpart on
the declaration side (Parameters).
The fact that the first argument can be a type (for builtins)
or cannot be a type (for regular function calls) is expressed
in the prose, no need to make the grammar more complicated.
Fixes issue 9001.
Patch Set 1 #Patch Set 2 : diff -r 3d68989bd1ea4f9d3cc7b37433522e7d3255a280 https://code.google.com/p/go/ #Patch Set 3 : diff -r 3d68989bd1ea4f9d3cc7b37433522e7d3255a280 https://code.google.com/p/go/ #Patch Set 4 : diff -r 849dcf4fd495eaaa55828e9d136cab7979dc1bef https://code.google.com/p/go/ #MessagesTotal messages: 8
|