go/test/fixedbugs/issue49814.go
Robert Griesemer bf9d9b7dba go/types, types2: better error message for some invalid integer array lengths
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>
2023-03-27 18:59:51 +00:00

15 lines
418 B
Go

// errorcheck
// Copyright 2021 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.
package main
// "must be integer" error is for 32-bit architectures
type V [1 << 50]byte // ERROR "larger than address space|invalid array length"
var X [1 << 50]byte // ERROR "larger than address space|invalid array length"
func main() {}