summaryrefslogtreecommitdiff
path: root/test/blank.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-12-09 11:59:21 -0500
committerRuss Cox <rsc@golang.org>2011-12-09 11:59:21 -0500
commite8b1eb47efab1e45b682b64776ae0c2c8170fdcc (patch)
tree72a4933228f72f138d23928fa78fbd9b9bc9afaa /test/blank.go
parentd403df9451ea39481d46216472f5093f84063773 (diff)
downloadgo-e8b1eb47efab1e45b682b64776ae0c2c8170fdcc.tar.gz
gc: fix another blank bug
R=ken2 CC=golang-dev http://codereview.appspot.com/5478051
Diffstat (limited to 'test/blank.go')
-rw-r--r--test/blank.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/blank.go b/test/blank.go
index 581bc85c8..d6c9e79c6 100644
--- a/test/blank.go
+++ b/test/blank.go
@@ -118,12 +118,29 @@ func (TI) M(x int, y int) {
}
}
+var fp = func(_ int, y int) {}
+
+func init() {
+ fp = fp1
+}
+
+func fp1(x, y int) {
+ if x != y {
+ println("invalid fp1 call:", x, y)
+ panic("bad fp1")
+ }
+}
+
+
func m() {
var i I
i = TI{}
i.M(1, 1)
i.M(2, 2)
+
+ fp(1, 1)
+ fp(2, 2)
}
// useless but legal