github.com/traefik/yaegi@v0.15.1/_test/struct22.go (about)

     1  package main
     2  
     3  type S struct {
     4  	Child *S
     5  	Name  string
     6  }
     7  
     8  func main() {
     9  	s := &S{Name: "root"}
    10  	s.Child = &S{Name: "child"}
    11  	println(s.Child.Name)
    12  }
    13  
    14  // Output:
    15  // child