OSDN Git Service

Update to current Go testsuite.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / go.test / test / blank.go
index 681a5e7..d6c9e79 100644 (file)
@@ -101,6 +101,46 @@ 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")
+       }
+}
+
+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
@@ -120,3 +160,4 @@ func _() {
 func ff() {
        var _ int = 1
 }
+