OSDN Git Service

Update Go library to r60.
[pf3gnuchains/gcc-fork.git] / libgo / go / go / types / testdata / exports.go
1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // This file is used to generate an object file which
6 // serves as test file for gcimporter_test.go.
7
8 package exports
9
10 import (
11         "go/ast"
12 )
13
14 const (
15         C0 int = 0
16         C1     = 3.14159265
17         C2     = 2.718281828i
18         C3     = -123.456e-789
19         C4     = +123.456E+789
20         C5     = 1234i
21         C6     = "foo\n"
22         C7     = `bar\n`
23 )
24
25 type (
26         T1  int
27         T2  [10]int
28         T3  []int
29         T4  *int
30         T5  chan int
31         T6a chan<- int
32         T6b chan (<-chan int)
33         T6c chan<- (chan int)
34         T7  <-chan *ast.File
35         T8  struct{}
36         T9  struct {
37                 a    int
38                 b, c float32
39                 d    []string `go:"tag"`
40         }
41         T10 struct {
42                 T8
43                 T9
44                 _ *T10
45         }
46         T11 map[int]string
47         T12 interface{}
48         T13 interface {
49                 m1()
50                 m2(int) float32
51         }
52         T14 interface {
53                 T12
54                 T13
55                 m3(x ...struct{}) []T9
56         }
57         T15 func()
58         T16 func(int)
59         T17 func(x int)
60         T18 func() float32
61         T19 func() (x float32)
62         T20 func(...interface{})
63         T21 struct{ next *T21 }
64         T22 struct{ link *T23 }
65         T23 struct{ link *T22 }
66         T24 *T24
67         T25 *T26
68         T26 *T27
69         T27 *T25
70         T28 func(T28) T28
71 )
72
73 var (
74         V0 int
75         V1 = -991.0
76 )
77
78 func F1()         {}
79 func F2(x int)    {}
80 func F3() int     { return 0 }
81 func F4() float32 { return 0 }
82 func F5(a, b, c int, u, v, w struct{ x, y T1 }, more ...interface{}) (p, q, r chan<- T10)
83
84 func (p *T1) M1()