Commit 13a0f7b
spec: clarify that signed integers>=0 are permitted as shift counts
In Go1.13 and above, signed integers are permitted as shift counts as long as they are >=0.
However, the comments in the "Arithmetic operators" section says shift operators accept "unsigned integer" as of right operands. Replacing this with "integer>=0" resolves the misunderstanding that shift
operators permit only unsigned integers.
Reference: Go1.13 Release Notes: https://golang.org/doc/go1.13
Change-Id: Icd3c7734d539ab702590e992a618c9251c653c37
GitHub-Last-Rev: 4f263a4
GitHub-Pull-Request: #44664
Reviewed-on: https://go-review.googlesource.com/c/go/+/297249
Reviewed-by: Emmanuel Odeke <[email protected]>
Reviewed-by: Robert Griesemer <[email protected]>
Trust: Emmanuel Odeke <[email protected]>
Trust: Robert Griesemer <[email protected]>1 parent d206ca5 commit 13a0f7b
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
3681 | 3681 | | |
3682 | 3682 | | |
3683 | 3683 | | |
3684 | | - | |
3685 | | - | |
| 3684 | + | |
| 3685 | + | |
3686 | 3686 | | |
3687 | 3687 | | |
3688 | 3688 | | |
| |||
0 commit comments