3 // Copyright 2021 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
9 type I interface{ foo() int }
17 func (x myint) foo() int { return int(x) }
21 func (x myfloat) foo() int { return int(x) }
25 func (x myint32) foo() int { return int(x) }
26 func (x myint32) bar() {}
29 switch x := i.(type) {
31 println("T/myint32", x.foo())
33 println("other", x.foo())
38 f[myfloat](myfloat(7))
39 f[myfloat](myint32(8))
40 f[myint32](myint32(9))