github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/struct1.gno (about)

     1  package main
     2  
     3  type T struct {
     4  	f int
     5  	g struct {
     6  		h int
     7  	}
     8  }
     9  
    10  func main() {
    11  	a := T{}
    12  	a.g.h = 3 + 2
    13  	println("a.g.h", a.g.h)
    14  }
    15  
    16  // Output:
    17  // a.g.h 5