github.com/traefik/yaegi@v0.15.1/_test/interface5.go (about) 1 package main 2 3 import "fmt" 4 5 type Myint int 6 7 func (i Myint) Double() { fmt.Println("Myint:", i, i) } 8 9 type Boo interface { 10 Double() 11 } 12 13 func f(boo Boo) { 14 boo.Double() 15 } 16 17 func main() { 18 var i Myint = 3 19 f(i) 20 } 21 22 // Output: 23 // Myint: 3 3