github.com/HaHadaxigua/yaegi@v1.0.1/_test/issue-1134.go (about) 1 package main 2 3 type I interface { 4 Hello() 5 } 6 7 type T struct { 8 Name string 9 Child []*T 10 } 11 12 func (t *T) Hello() { println("Hello", t.Name) } 13 14 func main() { 15 var i I = new(T) 16 i.Hello() 17 } 18 19 // Output: 20 // Hello