github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/access7.gno (about) 1 package main 2 3 import ( 4 "gno.land/p/demo/testutils" 5 ) 6 7 type mystruct struct{} 8 9 func (_ mystruct) privateMethod() string { 10 return "mystruct.privateMethod" 11 } 12 13 type PrivateInterface2 interface { 14 privateMethod() string 15 } 16 17 func main() { 18 var x PrivateInterface2 = mystruct{} 19 testutils.PrintPrivateInterface(x) 20 } 21 22 // Error: 23 // main/files/access7.gno:19: main.PrivateInterface2 does not implement gno.land/p/demo/testutils.PrivateInterface