Illegal assignment for const function

This error is generated when a function that is marked as const tries to assign to a formula variable or a class field. Example:

class Test {
  int x
  func wrong() const
    x = 3  ; Error!
  endfunc
}

To fix the error, either do not mark the function as const, or do not write to the class field or formula variable.

See Also
Errors