| // Copyright 2009 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // Test correct short declarations and redeclarations. |
| func f1() int { return 1 } |
| func f2() (float32, int) { return 1, 2 } |
| func f3() (float32, int, string) { return 1, 2, "3" } |
| return // tests that result var is in scope for redeclaration |
| j, f := f2() // redeclare f |
| // new block should be ok. |
| j, f := f2() // redeclare f |
| _, _, _, _, _, _, _, _, _ = i, f, s, j, k, m, g, s, h |
| _, _, _, _, _, _, _, _, _ = i, f, s, j, k, m, g, s, h |