E1026: returned value has the wrong type

View source

The value of a return statement must have the type that the verb declares after ->.

The value of a return statement must have the type that the verb declares after ->. The message names both types. The error points at the returned expression.

Example

actus
verb size() -> Int {
    return true;
}

verb main() {
}

Fix

Return a value of the declared type, or change the declared return type.

actus
verb size() -> Int {
    return 1;
}

verb main() {
}

Run actus explain E1026 in your terminal to read this entry offline. Browse Ownership & types or all error codes.