github.com/traefik/yaegi@v0.15.1/_test/type28.go (about) 1 package main 2 3 import "fmt" 4 5 type Foo = int 6 7 func (f *Foo) Bar() int { 8 return *f * *f 9 } 10 11 func main() { 12 x := Foo(1) 13 fmt.Println(x.Bar()) 14 } 15 16 // Error: 17 // 7:1: cannot define new methods on non-local type int