1 // $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG
3 // Copyright 2010 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.
7 // Test case for http://code.google.com/p/go/issues/detail?id=692
15 func foo() (int, int) {
20 func bar() (int, int) {
25 func bal() (int, int) {
30 var a, b = foo() // foo is called once
31 var c, _ = bar() // bar is called twice
32 var _, _ = bal() // bal is called twice
36 panic("fooCount != 1")
39 panic("barCount != 1")
42 panic("balCount != 1")