diff --git a/doc/go_spec.html b/doc/go_spec.html index 94ab9bbe7fe..84c7d510e9b 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -3694,8 +3694,10 @@ overflow etc. errors being caught.
-When evaluating the elements of an assignment or expression, -all function calls, method calls and +When evaluating the operands of an expression, +assignment, or +return statement, +all function calls, method calls, and communication operations are evaluated in lexical left-to-right order.
@@ -3715,6 +3717,12 @@ and indexing ofx
and the evaluation
of y
is not specified.
++a := 1 +f := func() int { a = 2; return 3 } +x := []int{a, f()} // x may be [1, 3] or [2, 3]: evaluation order between a and f() is not specified ++
Floating-point operations within a single expression are evaluated according to the associativity of the operators. Explicit parentheses affect the evaluation