1// run
2
3// Copyright 2018 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.
6
7// Issue 28390/28430: Function call arguments were not
8// converted correctly under some circumstances.
9
10package main
11
12import "fmt"
13
14type A struct {
15	K int
16	S string
17	M map[string]string
18}
19
20func 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
28func proxy() (x int, a A) {
29	return 1, newA(2, "3")
30}
31
32func consume(x int, a interface{}) {
33	fmt.Println(x)
34	fmt.Println(a) // used to panic here
35}
36
37func main() {
38	consume(proxy())
39}
40