E1004: borrow of a binding that is not an owner
ref creates an abs view of an owner.
ref creates an abs view of an owner. ADR-0016 lets an erg owner or a
received dat value create such a view. An abs parameter is already a
view, and an ins parameter is a loan that lasts only for the call, so
neither can be borrowed again. The error points at the declaration that holds
the ref.
Example
actus
Fix
Use the abs parameter directly. It is already a read-only view of the
caller's value.
actus
Run actus explain E1004 in your terminal to read this entry offline. Browse Ownership & types or all error codes.