mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
c8d2544b26
commit
8e515485e2
4 changed files with 44 additions and 14 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue