E0006 — Call arity mismatch

A call site passes a different number of arguments than the callee declared.


What triggers it

Resilient functions have a fixed arity — no variadics, no default arguments, no overloading. Calling with too few or too many arguments is rejected at compile time.

Minimal example

fn add(int a, int b) -> int {
    return a + b;
}
fn main() {
    return add(1);
}

Output:

scratch.rs:5:12: error[E0006]: call to `add` has 1 args, expected 2
   return add(1);
          ^

Fix

Pass the right number of arguments. If you genuinely want defaults, declare a second function that fills them in:

fn add_one(int a) -> int { return add(a, 1); }

Source

Emitted from the VM compiler in resilient/src/compiler.rs and the interpreter in resilient/src/main.rs.