E1059: method does not match its role
A method in a perform block must have the signature that the role declares (ADR-0014): the same parameter names, ownership roles and types, the same receiver and the same return...
A method in a perform block must have the signature that the role declares
(ADR-0014): the same parameter names, ownership roles and types, the same
receiver and the same return type. The message names the method and the role.
The error points at the method. A perform Drop for block has one fixed
shape, verb drop(ins self: T) without a return value, and any other shape is
reported here too. Effects, capabilities, realtime, deterministic and
must_use that differ from the role have their own codes.
Example
Fix
Write the method with the signature of the role. A drop method takes its
value as ins self.
Run actus explain E1059 in your terminal to read this entry offline. Browse Ownership & types or all error codes.