]> Cypherpunks repositories - gostls13.git/commitdiff
spec: clarify meaning of x op= y
authorRobert Griesemer <gri@golang.org>
Thu, 11 Jun 2015 20:21:46 +0000 (13:21 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 11 Jun 2015 22:41:07 +0000 (22:41 +0000)
Suggested by mdempsky (see also issue #11161).

Change-Id: I1ab28febe19b7a092029499015073ce8749b4d99
Reviewed-on: https://go-review.googlesource.com/10960
Reviewed-by: Ian Lance Taylor <iant@golang.org>
doc/go_spec.html

index b5f18f3a026839f329b8816165534d95380345ad..4b8d60b8e48913c9893dd6279b1d000062b04753 100644 (file)
@@ -1,6 +1,6 @@
 <!--{
        "Title": "The Go Programming Language Specification",
-       "Subtitle": "Version of May 26, 2015",
+       "Subtitle": "Version of June 11, 2015",
        "Path": "/ref/spec"
 }-->
 
@@ -4388,7 +4388,7 @@ a[i] = 23
 An <i>assignment operation</i> <code>x</code> <i>op</i><code>=</code>
 <code>y</code> where <i>op</i> is a binary arithmetic operation is equivalent
 to <code>x</code> <code>=</code> <code>x</code> <i>op</i>
-<code>y</code> but evaluates <code>x</code>
+<code>(y)</code> but evaluates <code>x</code>
 only once.  The <i>op</i><code>=</code> construct is a single token.
 In assignment operations, both the left- and right-hand expression lists
 must contain exactly one single-valued expression, and the left-hand