mirror of
https://github.com/golang/go
synced 2024-11-24 21:30:10 -07:00
9bd6b0afa4
bug255.go:11: error: array bound truncated to integer bug255.go:12: error: array bound is not numeric bug255.go:13: error: array bound is not numeric bug255.go:14: error: array bound is not constant bug255.go:15: error: array bound overflows R=rsc CC=golang-dev https://golang.org/cl/2091042
16 lines
491 B
Go
16 lines
491 B
Go
// errchk $G -e $D/$F.go
|
|
|
|
// 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.
|
|
|
|
package main
|
|
|
|
var a [10]int // ok
|
|
var b [1e1]int // ok
|
|
var c [1.5]int // ERROR "truncated"
|
|
var d ["abc"]int // ERROR "invalid array bound|not numeric"
|
|
var e [nil]int // ERROR "invalid array bound|not numeric"
|
|
var f [e]int // ERROR "invalid array bound|not constant"
|
|
var g [1<<65]int // ERROR "overflows"
|