github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/struct3.gno (about) 1 package main 2 3 type T struct { 4 f int 5 g int 6 h struct { 7 k int 8 } 9 } 10 11 func f(i int) int { return i + 3 } 12 13 func main() { 14 a := T{} 15 a.h.k = f(4) 16 println(a.h.k) 17 } 18 19 // Output: 20 // 7