mirror of
https://github.com/golang/go
synced 2024-09-04 23:44:16 +00:00
![Keith Randall](/assets/img/avatar_default.png)
Fixes a bug where assignments that should come after a call were instead being issued before the call. Fixes #17596 Fixes #17618 Change-Id: Ic9ae4c34ae38fc4ccd0604b65345b05896a2c295 Reviewed-on: https://go-review.googlesource.com/32226 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
20 lines
314 B
Go
20 lines
314 B
Go
// compile
|
|
|
|
// Copyright 2016 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.
|
|
|
|
package foo
|
|
|
|
type T interface {
|
|
foo()
|
|
}
|
|
|
|
func f() (T, int)
|
|
|
|
func g(v interface{}) (interface{}, int) {
|
|
var x int
|
|
v, x = f()
|
|
return v, x
|
|
}
|