gitlab.com/ethan.reesor/vscode-notebooks/yaegi@v0.0.0-20220417214422-5c573557938e/_test/struct54.go (about) 1 package main 2 3 type S struct { 4 t *T 5 } 6 7 func newS() *S { 8 return &S{ 9 t: &T{u: map[string]*U{}}, 10 } 11 } 12 13 type T struct { 14 u map[string]*U 15 } 16 17 type U struct { 18 a int 19 } 20 21 func main() { 22 s := newS() 23 _ = s 24 25 println("ok") 26 }