mirror of
https://github.com/golang/go
synced 2024-11-25 06:37:58 -07:00
fbee173545
CL 279442 refactored typecheck arithmetic operators, but using wrong condition for checking invalid rhs. Updates #43311 Change-Id: I7a03a5535b82ac4ea4806725776b0a4f7af1b79a Reviewed-on: https://go-review.googlesource.com/c/go/+/298714 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
17 lines
395 B
Go
17 lines
395 B
Go
// errorcheck -d=panic
|
|
|
|
// Copyright 2010 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Used to crash; issue 961.
|
|
|
|
package main
|
|
|
|
type ByteSize float64
|
|
|
|
const (
|
|
_ = iota // ignore first value by assigning to blank identifier
|
|
KB ByteSize = 1 << (10 * X) // ERROR "undefined"
|
|
)
|