OSDN Git Service

4f4c75527606d5ad0d7c34d1127cdc8a41aa5e0c
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / go.test / test / nil.go
1 // $G $F.go && $L $F.$A && ./$A.out
2
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
7 package main
8
9 type T struct {
10         i int
11 }
12
13 type IN interface{}
14
15 func main() {
16         var i *int
17         var f *float32
18         var s *string
19         var m map[float32]*int
20         var c chan int
21         var t *T
22         var in IN
23         var ta []IN
24
25         i = nil
26         f = nil
27         s = nil
28         m = nil
29         c = nil
30         t = nil
31         i = nil
32         ta = make([]IN, 1)
33         ta[0] = nil
34
35         _, _, _, _, _, _, _, _ = i, f, s, m, c, t, in, ta
36 }