OxL Reference

error arg-count

error Standard: [§6.1]

What it means#

The call passes fewer or more arguments than the function has parameters (§6.1). Parameters with default values and a variadic last parameter ...xs: T may be omitted or repeated; all other parameters must be supplied.

Example#

oxl✓ checked in CI
fn add(a: i32, b: i32) -> i32 => a + b

fn main() {
  let s = add(1)      // <- arg-count
}
error
arg-count

How to fix#

oxl✓ checked in CI
fn add(a: i32, b: i32) -> i32 => a + b

fn main() {
  let s = add(1, 2)
}

Pass every required argument, or give the missing parameter a default value in the declaration (b: i32 = 0).

See also#

OxL 1.0.0-beta · Documentation version 1.0.0-beta© OxwaldLink · generated from the Standard, the std sources and the guides