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

     1  package main
     2  
     3  type S1 struct {
     4  	Name string
     5  }
     6  
     7  type S2 struct {
     8  	*S1
     9  }
    10  
    11  func main() {
    12  	s1 := &S1{"foo"}
    13  	s2 := S2{s1}
    14  	println(s2.Name)
    15  }
    16  
    17  // Output:
    18  // foo