Source file
test/fixedbugs/issue28390.go
1
2
3
4
5
6
7
8
9
10 package main
11
12 import "fmt"
13
14 type A struct {
15 K int
16 S string
17 M map[string]string
18 }
19
20 func newA(k int, s string) (a A) {
21 a.K = k
22 a.S = s
23 a.M = make(map[string]string)
24 a.M[s] = s
25 return
26 }
27
28 func proxy() (x int, a A) {
29 return 1, newA(2, "3")
30 }
31
32 func consume(x int, a interface{}) {
33 fmt.Println(x)
34 fmt.Println(a)
35 }
36
37 func main() {
38 consume(proxy())
39 }
40
View as plain text