github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/interface5.gno (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