diff options
author | Russ Cox <rsc@golang.org> | 2011-11-28 16:40:39 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2011-11-28 16:40:39 -0500 |
commit | 8e515485e277b982ce4265d72b0d92f76242b651 (patch) | |
tree | 10ae7a6084d5f67e37df53113be5fe346e3eabbe /test/blank.go | |
parent | c8d2544b269bb4ece49d4804845c3e64b32cd7e5 (diff) | |
download | go-8e515485e277b982ce4265d72b0d92f76242b651.tar.gz go-8e515485e277b982ce4265d72b0d92f76242b651.zip |
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
Diffstat (limited to 'test/blank.go')
-rw-r--r-- | test/blank.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/blank.go b/test/blank.go index 681a5e77cb..581bc85c80 100644 --- a/test/blank.go +++ b/test/blank.go @@ -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 } + |