2012-02-16 21:49:59 -07:00
|
|
|
// errorcheck
|
2010-02-12 14:59:02 -07:00
|
|
|
|
|
|
|
// 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"
|
2010-08-31 18:38:11 -06:00
|
|
|
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"
|
2010-02-12 14:59:02 -07:00
|
|
|
var g [1<<65]int // ERROR "overflows"
|