3 // Copyright 2009 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 correct short declarations and redeclarations.
11 func f1() int { return 1 }
12 func f2() (float32, int) { return 1, 2 }
13 func f3() (float32, int, string) { return 1, 2, "3" }
18 return // tests that result var is in scope for redeclaration
23 j, f := f2() // redeclare f
28 // new block should be ok.
30 j, f := f2() // redeclare f
34 _, _, _, _, _, _, _, _, _ = i, f, s, j, k, m, g, s, h
36 if y := x(); y != "3" {
37 println("x() failed", y)
40 _, _, _, _, _, _, _, _, _ = i, f, s, j, k, m, g, s, h