1
0
mirror of https://github.com/golang/go synced 2024-11-11 22:20:22 -07:00

spec: clarify sentence about non-constant shifts

Fixes #10514.

Change-Id: Iae95a304d3ebb1ed82567aa234e05dc434db984f
Reviewed-on: https://go-review.googlesource.com/13098
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Robert Griesemer 2015-08-04 10:38:50 -07:00
parent 1579822be1
commit 87c8707e6f

View File

@ -3320,7 +3320,7 @@ to the type of the other operand.
The right operand in a shift expression must have unsigned integer type
or be an untyped constant that can be converted to unsigned integer type.
If the left operand of a non-constant shift expression is an untyped constant,
the type of the constant is what it would be if the shift expression were
it is first converted to the type it would assume if the shift expression were
replaced by its left operand alone.
</p>