E1023: unknown type

View source

A type name in a declaration, parameter, return type or struct field is not a built-in type, a declared struct, enum or pack, or a type imported into the module.

A type name in a declaration, parameter, return type or struct field is not a built-in type, a declared struct, enum or pack, or a type imported into the module. ADR-0041 requires the compiler to reject unknown types instead of guessing. The message names the type, and the error points at the declaration that uses it. A type may be declared anywhere in the unit, so an enum payload may name a struct, pack or enum that comes later in the file; only a name that is declared nowhere is unknown.

Example

actus
verb main() {
    erg a: Wibble = 1;
}

Fix

Declare the type, or import it, or correct the spelling.

actus
struct Wibble {
    n: Int,
}

verb main() {
    erg a: Wibble = Wibble { n: 1, };
}

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