Updates #13940.
Change-Id: I41974c292dd981d82ac03b9b8b406713445362c3
Reviewed-on: https://go-review.googlesource.com/20081
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
return
}
// rhs must be within reasonable bounds
- const stupidShift = 1023 - 1 + 52 // so we can express smallestFloat64
+ const shiftBound = 1023 - 1 + 52 // so we can express smallestFloat64
s, ok := constant.Uint64Val(yval)
- if !ok || s > stupidShift {
- check.invalidOp(y.pos(), "stupid shift count %s", y)
+ if !ok || s > shiftBound {
+ check.invalidOp(y.pos(), "invalid shift count %s", y)
x.mode = invalid
return
}
s = 10
_ = 0<<0
_ = 1<<s
- _ = 1<<- /* ERROR "stupid shift" */ 1
- _ = 1<<1075 /* ERROR "stupid shift" */
+ _ = 1<<- /* ERROR "invalid shift" */ 1
+ _ = 1<<1075 /* ERROR "invalid shift" */
_ = 2.0<<1
_ int = 2<<s
_ = float64 /* ERROR "must be integer" */ (0) >> 2
_ = complex64 /* ERROR "must be integer" */ (0) << 3
_ = complex64 /* ERROR "must be integer" */ (0) >> 4
-}
\ No newline at end of file
+}