1
2
3
4
5
6
7 package one
8
9 type T int
10
11
12 func F1(T *T) bool { return T == nil }
13
14
15 func F2(c chan int) bool { return c == (<-chan int)(nil) }
16
17
18 func F3() (ret []int) { return append(ret, 1) }
19
20
21 func (_ *T) M() int { return 1 }
22 func (t *T) MM() int { return t.M() }
23
24
25
26 type S struct { x, y int }
27 type U []S
28
29 func F4(S int) U { return U{{S,S}} }
30
31 func F5() []*S {
32 return []*S{ {1,2}, { 3, 4} }
33 }
34
35 func F6(S int) *U {
36 return &U{{S,S}}
37 }
38
39
40
41 type PB struct { x int }
42
43 func (t *PB) Reset() { *t = PB{} }
44
View as plain text