E1025: argument of the wrong type
The type of an argument must be the type of the parameter.
The type of an argument must be the type of the parameter. Actus has no
implicit conversion between types, not even between integer widths. Int and
u32 are different types. The message names the callee, the parameter and
both types, and the error points at the argument.
The branches of an if or a case whose value is used must all have a value
of one type. A branch whose block ends in a statement has no value, and the
message names it as Void. A branch that ends in return, break or
continue leaves and needs no value, and a case used as a statement
discards its values. An if or case whose value is used is also rejected
when none of its branches has a value; without a declared type the message
expects value.
Example
A case arm whose block has no value is the same error:
Fix
Pass a value of the declared type. Here the binding is declared with that type.
Run actus explain E1025 in your terminal to read this entry offline. Browse Ownership & types or all error codes.