mirror of
https://github.com/golang/go
synced 2024-09-04 15:34:21 +00:00
doc: correct statement in go1.10 release notes
The language spec requires the RHS operand of shift expressions to be unsigned integers.
The changes in CL 60230 and the related CL 81277 refer to a variable s of type uint.
The "untyped constant" here refers to 1.0, not s.
Change-Id: Id2b884816af7f79f453afcb8c34ade2d34e18bc2
GitHub-Last-Rev: b26c853cae
GitHub-Pull-Request: golang/go#24989
Reviewed-on: https://go-review.googlesource.com/108676
Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
22115859a5
commit
c0769741f5
|
@ -43,9 +43,9 @@ There are no significant changes to the language specification.
|
|||
</p>
|
||||
|
||||
<p><!-- CL 60230 -->
|
||||
A corner case involving shifts by untyped constants has been clarified,
|
||||
A corner case involving shifts of untyped constants has been clarified,
|
||||
and as a result the compilers have been updated to allow the index expression
|
||||
<code>x[1.0</code> <code><<</code> <code>s]</code> where <code>s</code> is an untyped constant;
|
||||
<code>x[1.0</code> <code><<</code> <code>s]</code> where <code>s</code> is an unsigned integer;
|
||||
the <a href="/pkg/go/types/">go/types</a> package already did.
|
||||
</p>
|
||||
|
||||
|
|
Loading…
Reference in a new issue