github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/struct54.gno (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 } 27 28 // Output: 29 // ok