github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/composite1.gno (about) 1 package main 2 3 import "fmt" 4 5 var a = &[]*T{{}} 6 7 // NOTE: 8 // lowercase fields don't work with native funcs. 9 // see tests/files/composite1b.gno for gno println. 10 type T struct{ Name string } 11 12 func main() { 13 fmt.Println((*a)[0]) 14 } 15 16 // Output: 17 // &{}