github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/zrealm_crossrealm6.gno (about) 1 // PKGPATH: gno.land/r/crossrealm_test 2 package crossrealm_test 3 4 import ( 5 "gno.land/p/demo/tests" 6 ) 7 8 var somevalue tests.TestRealmObject2 9 10 func init() { 11 somevalue.Field = "test" 12 } 13 14 func main() { 15 // this is OK because the method is declared in a non-realm package. 16 somevalue.Modify() 17 println(somevalue) 18 } 19 20 // Output: 21 // (struct{("modified" string)} gno.land/p/demo/tests.TestRealmObject2)