mirror of
https://github.com/golang/go
synced 2024-11-14 15:10:54 -07:00
a1b5cb1d04
The only ways to construct an OLITERAL node are (1) a basic literal from the source package, (2) constant folding within evconst (which only folds Go language constants), (3) the universal "nil" constant, and (4) implicit conversions of nil to some concrete type. Passes toolstash-check. Change-Id: I30fc6b07ebede7adbdfa4ed562436cbb7078a2ff Reviewed-on: https://go-review.googlesource.com/c/go/+/166981 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@golang.org>
16 lines
365 B
Go
16 lines
365 B
Go
// errorcheck
|
|
|
|
// 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"
|
|
)
|