github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/struct35.gno (about) 1 package main 2 3 type T struct { 4 f func(*T) 5 } 6 7 func f1(t *T) { t.f = f1 } 8 9 func main() { 10 t := &T{} 11 f1(t) 12 println(t.f != nil) 13 } 14 15 // Output: 16 // true