Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

persistedcap state

Back to all declarations

GetCounter

func() func(...)

GetCounter returns the persisted closure. The caller invokes it directly — because the closure's FuncLit lives in /p/ p\_closurecap, PushFrameCall's borrow rule does NOT switch m.Realm to persistedcap at invocation. The closure body's write to the captured HIV (PkgID = persistedcap, persisted) therefore runs under the caller's m.Realm, which is the persisted-closure-capture cross-realm case. SECURITY: deliberate VM-parity-test infrastructure — do NOT copy this pattern in production code. See gno.land/r/tests/vm/crossrealm Closure for the broader rationale.

Open
OID
089230…bf58:6
GetCounter details

Inspect func
counter : func() int Inspect
init.1 : func() Inspect
GetCounter : func() func(...) Inspect