E1024: verb declared twice

View source

A module can hold only one verb with a given name.

A module can hold only one verb with a given name. Actus has no overloading, so a call is resolved by name alone. The error points at the second declaration. A struct with a repeated name is reported as E1029.

Example

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

verb run() -> Int {
    return 2;
}

verb main() {
}

Fix

Rename one of the verbs, or remove the duplicate.

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

verb run_again() -> Int {
    return 2;
}

verb main() {
}

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