E1151: local binding declared with the `ins` role
ins is an instrument lent for one call (ADR-0020, REQ-VIEW-0090).
ins is an instrument lent for one call (ADR-0020, REQ-VIEW-0090). It is valid
on a verb parameter and as the role of a call-site argument, where the loan
begins and ends with the call. A local binding outlives any one call, so it
cannot be a loan: declare it erg, and lend it with ins at the call that
needs to change it. The message names the binding and the role. The error
points at the declaration.
Example
Fix
Declare the binding with erg.
actus check --format json offers this as a safe fix: it replaces the ins
keyword by erg and, at every call in the binding's scope that passed it to an
ins parameter with no role (the calls that relied on the old inference of an
ins local), writes ins before the argument, so the fixed program checks
without a second round. actus fix applies it.
Run actus explain E1151 in your terminal to read this entry offline. Browse Modules & rules or all error codes.