E5007 Runtime Errors

immutable-array

cannot modify const array

When this occurs

Modifying const array

Example error message

error[E5007]: cannot modify immutable array (declared as const)

How to fix

Use `var` instead of `const` for the array if you need to modify it.

Related errors