OSDN Git Service

compiler: Prohibit comparisons of funcs, maps, and slices to non-nil.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / go.test / test / init.go
1 // errchk $G -e $D/$F.go
2
3 // Copyright 2011 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
7 package main
8
9 import "runtime"
10
11 func init() {
12 }
13
14 func main() {
15         init()         // ERROR "undefined.*init"
16         runtime.init() // ERROR "unexported.*runtime\.init"
17         var _ = init   // ERROR "undefined.*init"
18 }