Commit 637d5985 authored by Robert Griesemer's avatar Robert Griesemer

spec: clarify meaning of x op= y

Suggested by mdempsky (see also issue #11161).

Change-Id: I1ab28febe19b7a092029499015073ce8749b4d99
Reviewed-on: https://go-review.googlesource.com/10960Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 06ef022b
<!--{
"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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment