github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/assign21.gno (about) 1 package main 2 3 type thing int 4 5 func (t *thing) pass() (*thing, bool) { 6 return t, true 7 } 8 9 func main() { 10 a_ := thing(1) 11 a := &a_ 12 a, ok := a.pass() 13 println(*a, ok) 14 } 15 16 // Output: 17 // (1 main.thing) true