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

     1  package main
     2  
     3  type T struct {
     4  	f func(*T)
     5  }
     6  
     7  func f1(t *T) { t.f = f2 }
     8  
     9  func f2(t *T) { t.f = f1 }
    10  
    11  func main() {
    12  	println("ok")
    13  }
    14  
    15  // Output:
    16  // ok