diff --git a/doc/go_spec.html b/doc/go_spec.html index de35425b3b..165e9bebf2 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -3394,7 +3394,8 @@ Conversion = Type "(" Expression [ "," ] ")" .

-If the type starts with an operator it must be parenthesized: +If the type starts with the operator * or <-, +or the keyword func, it must be parenthesized:

@@ -3402,6 +3403,8 @@ If the type starts with an operator it must be parenthesized:
 (*Point)(p)      // p is converted to (*Point)
 <-chan int(c)    // same as <-(chan int(c))
 (<-chan int)(c)  // c is converted to (<-chan int)
+func()(x)        // function signature func() x
+(func())(x)      // x is converted to (func())
 

@@ -3488,6 +3491,12 @@ implements this functionality under restricted circumstances.

+

+Implementation restriction: For backward-compatibility with the Go 1 language +specification, a compiler may accept non-parenthesized literal function types +in conversions where the syntax is unambiguous. +

+

Conversions between numeric types