E1097: constant needs a compile-time value
A const is replaced by its value while compiling, and it has no storage at run time (ADR-0052).
A const is replaced by its value while compiling, and it has no storage at
run time (ADR-0052). Its initializer may use literals, other constants and the
checked operators, but not a call, a read of a binding or anything else that
needs the program to run. The same code is reported for a pack offset that
names a constant that has no value at compile time. The message names the
constant. The error points at the declaration.
Example
actus
Fix
Write the value from literals and other constants.
actus
Run actus explain E1097 in your terminal to read this entry offline. Browse Ownership & types or all error codes.