E1099: dynamic role is not declared

View source

A parameter written dynamic Name must name a role that is declared with role (ADR-0014).

A parameter written dynamic Name must name a role that is declared with role (ADR-0014). A struct, an enum or a name that does not exist is not a role, and a call through it could not be resolved. The message names the role. The error points at the name. A role that is unknown outside a dynamic parameter is reported as E1056.

Example

actus
verb pull(abs source: dynamic Missing) -> Int {
    return 0;
}

verb main() {
}

Fix

Declare the role, or correct the name.

actus
struct Cursor {
    position: Int,
}

role Reader {
    verb read(abs self: Cursor) -> Int;
}

verb pull(abs source: dynamic Reader) -> Int {
    return 0;
}

verb main() {
}

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