summaryrefslogtreecommitdiff
path: root/test/blank.go
diff options
context:
space:
mode:
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