Mettle

E0003Semantic error

Reported by the compiler as an error or warning.

mettle explain E0003

The code is grammatically valid but does not make sense: an undefined variable or function, a duplicate declaration, a wrong argument count, break outside a loop, and similar.

Example

fn main() -> int64 {
    return cout;      // error: Undefined variable 'cout'
}

The compiler suggests the closest in-scope name ("did you mean 'count'?") and, for duplicate declarations and call errors, points at the previous declaration / the function definition in a note.

Related