github.com/traefik/yaegi@v0.15.1/_test/issue-1371.go (about)

     1  package main
     2  
     3  import "fmt"
     4  
     5  type node struct {
     6  	parent *node
     7  	child  []*node
     8  	key    string
     9  }
    10  
    11  func main() {
    12  	root := &node{key: "root"}
    13  	root.child = nil
    14  	fmt.Println("root:", root)
    15  }
    16  
    17  // Output:
    18  // root: &{<nil> [] root}