Lyricdev
GitHub

LYR-SEM0087

a call that no function of the name takes

error ยท spec 08-expressions

A name shared by several functions is called with a number of arguments none of them takes.

Explanation

The argument count chooses the function. When no declaration of the name takes that many arguments, there is nothing to call; the notes list how many each one takes.

Pass the number of arguments one of them takes.

Wrong

fn code(n: int): int { return n; }
fn code(a: int, b: int, c: int): int { return a + b + c; }

fn main(): void {
    let _ = code(1, 2);
}
fn code(n: int): int { return n; }
fn code(a: int, b: int, c: int): int { return a + b + c; }

fn main(): void {
    let _ = code(1, 2, 0);
}