github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/struct42.gno (about) 1 package main 2 3 type T struct { 4 t func(*T) 5 y *xxx 6 } 7 8 func f(t *T) { println("in f") } 9 10 var x = &T{t: f} 11 12 type xxx struct{} 13 14 func main() { 15 println("ok") 16 } 17 18 // Output: 19 // ok