1// run
2
3// Copyright 2012 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// Was discarding function calls made for arguments named _
8// in inlined functions.  Issue 3593.
9
10package main
11
12var did int
13
14func main() {
15	foo(side())
16	foo2(side(), side())
17	foo3(side(), side())
18	T.m1(T(side()))
19	T(1).m2(side())
20	const want = 7
21	if did != want {
22		println("BUG: missing", want-did, "calls")
23	}
24}
25
26func foo(_ int) {}
27func foo2(_, _ int) {}
28func foo3(int, int) {}
29type T int
30func (_ T) m1() {}
31func (t T) m2(_ int) {}
32
33func side() int {
34	did++
35	return 1
36}
37