E1003: undeclared identifier

View source

An identifier in an expression or statement does not name any binding, parameter or constant that is visible at that point.

An identifier in an expression or statement does not name any binding, parameter or constant that is visible at that point. The cause is usually a typo, a binding that was declared later or in another block, or a missing declaration. The error points at the unknown name.

Example

actus
verb main() {
    erg total: Int = missing + 1;
}

Fix

Declare the name before it is used, in a scope that contains the use.

actus
verb main() {
    erg missing: Int = 2;
    erg total: Int = missing + 1;
}

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