Lyricdev
GitHub

LYR-PAR0044

an extern symbol that is not a string

error ยท spec 13-abi

An extern declaration has = after its signature, and no string literal follows to name the symbol.

Explanation

The symbol of an extern function names something outside Lyric, so it is written as the other side spells it, in a string: extern "C" fn labs(x: int): int = "labs";. Without the = the function's own name is the symbol.

Write the symbol as a string, or drop the = and the symbol.

Wrong

extern "C" fn labs(x: int): int = ;

fn main(): void {
}
extern "C" fn labs(x: int): int = "labs";

fn main(): void {
    let _ = labs(-1);
}