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

     1  package main
     2  
     3  type T struct {
     4  	f int
     5  	g int
     6  	h int
     7  }
     8  
     9  func main() {
    10  	_ = T{f: 1, g: 2, h: 3, f: 4, h: 5}
    11  }
    12  
    13  // Error:
    14  // duplicate field name f in struct literal