diff --git a/doc/go_spec.html b/doc/go_spec.html index de35425b3b158cfcd7d85ff550ad68cdba070f8a..165e9bebf2423191897feead91b11cf6f181228b 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ <!--{ "Title": "The Go Programming Language Specification", - "Subtitle": "Version of September 28, 2012", + "Subtitle": "Version of October 3, 2012", "Path": "/ref/spec" }--> @@ -3394,7 +3394,8 @@ Conversion = Type "(" Expression [ "," ] ")" . </pre> <p> -If the type starts with an operator it must be parenthesized: +If the type starts with the operator <code>*</code> or <code><-</code>, +or the keyword <code>func</code>, it must be parenthesized: </p> <pre> @@ -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()) </pre> <p> @@ -3488,6 +3491,12 @@ implements this functionality under restricted circumstances. </p> +<p> +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. +</p> + <h4>Conversions between numeric types</h4> <p>