Lyricdev
GitHub

LYR-SEM0002

a name that nothing in scope declares

error ยท spec 04-modules

An identifier in an expression names no local, parameter, function, global or imported item visible at that point. The message may carry a did-you-mean note.

Explanation

Every name an expression uses is declared before it in an enclosing block, in the module, or brought in with import. A misspelling or a missing import is the usual cause.

Correct the spelling, declare the name, or import it (import std.io { println };).

Wrong

fn main(): void {
    let count = 3;
    let _ = cuont + 1;
}
fn main(): void {
    let count = 3;
    let _ = count + 1;
}