E1037: invalid receiver for a method
A verb is a method only when its first parameter is named self and has the type of a declared struct (ADR-0029).
A verb is a method only when its first parameter is named self and has the
type of a declared struct (ADR-0029). A self parameter of another type, such
as Int, can never be the receiver of a call, so the declaration is rejected. The
error points at the self parameter.
Example
actus
Fix
Give self the type of a struct, or rename the parameter if the verb is not
meant to be a method.
actus
Run actus explain E1037 in your terminal to read this entry offline. Browse Ownership & types or all error codes.