blob: 11ff5ff3c7563802a084e353d7ca11100f1b4b33 [file] [log] [blame]
Russ Cox2b1c9b42012-02-16 23:49:30 -05001// errorcheck
Ian Lance Taylorc9399f12009-07-21 14:05:21 -07002
3// Copyright 2009 The Go Authors. All rights reserved.
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file.
6
7package main
Russ Cox9dc22b62009-08-03 11:58:52 -07008var v1 = ([10]int)(nil); // ERROR "illegal|nil|invalid"
9var v2 [10]int = nil; // ERROR "illegal|nil|incompatible"
10var v3 [10]int;
11var v4 = nil; // ERROR "nil"
Ian Lance Taylorc9399f12009-07-21 14:05:21 -070012func main() {
13 v3 = nil; // ERROR "illegal|nil|incompatible"
14}