E1076: arena capacity is not a positive constant

View source

Arena[N] is a bounded store whose size is known when the program is compiled (ADR-0030).

Arena[N] is a bounded store whose size is known when the program is compiled (ADR-0030). N is a number of bytes and must be a positive compile-time integer. Zero leaves no room for any value, and a name that is not a constant has no value at compile time. The message names the capacity that was written. The error points at the capacity in the type.

Example

actus
verb main() {
    erg arena: Arena[0] = Arena[0]();
}

Fix

Give the arena a positive size that is large enough for the values that will be placed in it.

actus
verb main() {
    erg arena: Arena[64] = Arena[64]();
}

Run actus explain E1076 in your terminal to read this entry offline. Browse Ownership & types or all error codes.