1// compile 2 3// Copyright 2012 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 4529: escape analysis crashes on "go f(g())" 8// when g has multiple returns. 9 10package main 11 12type M interface{} 13 14type A struct { 15 a string 16 b chan M 17} 18 19func (a *A) I() (b <-chan M, c chan<- M) { 20 a.b, c = make(chan M), make(chan M) 21 b = a.b 22 23 return 24} 25 26func Init(a string, b *A, c interface { 27 I() (<-chan M, chan<- M) 28}) { 29 b.a = a 30 go b.c(c.I()) 31} 32 33func (a *A) c(b <-chan M, _ chan<- M) {} 34