E1141: call of a verb that returns nothing used as a value

View source

A verb with no return type gives no value.

A verb with no return type gives no value. Its call is correct as a statement of its own, and it is an error where the program needs a value: a binding, an assignment, an argument, an operand, a condition, a return, a conditional value or a field initializer. The error points at the call, and the message names the verb. The built-in output calls print and eprint return nothing as well, so erg y = print(int: 1); is this error too.

Example

actus
verb log() {
}

verb main() {
    erg value = log();
}

Fix

Call the verb as a statement. If you need a value, give the verb a return type and return one.

actus
verb log() {
}

verb main() {
    log();
}

Run actus explain E1141 in your terminal to read this entry offline. Browse Modules & rules or all error codes.