gc: remove funarg special case in structfield

This should make CL 5431046 a little simpler.

R=ken2
CC=golang-dev
https://golang.org/cl/5444048
This commit is contained in:
Russ Cox 2011-11-28 16:40:39 -05:00
parent c8d2544b26
commit 8e515485e2
4 changed files with 44 additions and 14 deletions

View file

@ -101,6 +101,29 @@ func main() {
}
h(a, b)
m()
}
type I interface {
M(_ int, y int)
}
type TI struct{}
func (TI) M(x int, y int) {
if x != y {
println("invalid M call:", x, y)
panic("bad M")
}
}
func m() {
var i I
i = TI{}
i.M(1, 1)
i.M(2, 2)
}
// useless but legal
@ -120,3 +143,4 @@ func _() {
func ff() {
var _ int = 1
}