mirror of
https://github.com/golang/go
synced 2024-11-17 19:54:45 -07:00
bf9d9b7dba
Don't say "array length must be integer" if it is in fact an integer. Fixes #59209 Change-Id: If60b93a0418f5837ac334412d3838eec25eeb855 Reviewed-on: https://go-review.googlesource.com/c/go/+/479115 Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
14 lines
385 B
Go
14 lines
385 B
Go
// errorcheck
|
|
|
|
// Copyright 2013 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.
|
|
|
|
// issue 5609: overflow when calculating array size
|
|
|
|
package pkg
|
|
|
|
const Large uint64 = 18446744073709551615
|
|
|
|
var foo [Large]uint64 // ERROR "array bound is too large|array bound overflows|invalid array length"
|