1// Copyright 2012 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// Functions that the inliner exported incorrectly.
6
7package one
8
9type T int
10
11// Issue 2678
12func F1(T *T) bool { return T == nil }
13
14// Issue 2682.
15func F2(c chan int) bool { return c == (<-chan int)(nil) }
16
17// Use of single named return value.
18func F3() (ret []int) { return append(ret, 1) }
19
20// Call of inlined method with blank receiver.
21func (_ *T) M() int { return 1 }
22func (t *T) MM() int { return t.M() }
23
24
25// One more like issue 2678
26type S struct { x, y int }
27type U []S
28
29func F4(S int) U { return U{{S,S}} }
30
31func F5() []*S {
32	return []*S{ {1,2}, { 3, 4} }
33}
34
35func F6(S int) *U {
36	return &U{{S,S}}
37}
38
39// Bug in the fix.
40
41type PB struct { x int }
42
43func (t *PB) Reset() { *t = PB{} }
44