E1142: assignment to a constant
A const is fixed at compile time.
A const is fixed at compile time. It is a value, not a binding, so no
assignment, compound assignment, field assignment or indexed assignment may
name it. ADR-0052 defines constants as immutable values that do not take part
in ownership. The compiler reports this error instead of an undeclared
identifier, because the name does exist.
Example
actus
Fix
Declare an erg binding for a value that changes, and assign to that.
actus
Run actus explain E1142 in your terminal to read this entry offline. Browse Modules & rules or all error codes.