github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/type37d.gno (about) 1 package main 2 3 type IntPtr *int 4 5 var ip IntPtr = new(int) 6 7 func (p IntPtr) Int() int { 8 return *p 9 } 10 11 func main() { 12 println(ip.Int()) 13 } 14 15 // Error: 16 // main/files/type37d.gno:7: invalid receiver type main.IntPtr (base type is pointer type)