Source file
test/declbad.go
1
2
3
4
5
6
7
8
9
10 package main
11
12 func f1() int { return 1 }
13 func f2() (float32, int) { return 1, 2 }
14 func f3() (float32, int, string) { return 1, 2, "3" }
15
16 func main() {
17 {
18
19 i := f1()
20 i := f1()
21 _ = i
22 }
23 {
24
25 i, f, s := f3()
26 f, g, t := f3()
27 _, _, _, _, _ = i, f, s, g, t
28 }
29 {
30
31 i, f, s := f3()
32 j, i, t := f3()
33 _, _, _, _, _ = i, f, s, j, t
34 }
35 {
36
37 i, f, s := f3()
38 i, f := f2()
39 _, _, _ = i, f, s
40 }
41 {
42
43 i := f1
44 i := func() int {
45 return 0
46 }
47 _ = i
48 }
49 {
50
51 i, f, s := f3()
52 i := 1
53 _, _, _ = i, f, s
54 }
55
56 {
57 i, f, s := f3()
58 i, f := f2()
59 _, _, _ = i, f, s
60 }
61 {
62
63 i, f, s := f3()
64 i, f, s := f3()
65 _, _, _ = i, f, s
66 }
67 }
68
View as plain text