Lyricdev
GitHub

LYR-PAR0026

a name is missing

error · spec 02-grammar

Where a declaration, a parameter, a field, a variant, a type parameter, an attribute, an import item or a path segment is named, no name stands — or a reserved word, which is then read as the name; an import list { } names nothing; a bare ... closes the parameters of a function that is no extern "C" one.

Explanation

A declaration and each of its parts is named with an identifier. A reserved word such as match or in cannot be a name; the error carries a note when that is the reason. An import's braces name at least one item; for the whole module, leave them off.

Write the name, or choose one that is not a keyword.

Wrong

fn (): void {
}

fn main(): void {
}
fn empty(): void {
}

fn main(): void {
    empty();
}