Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Match Errors

Missing Arguments

If you do not provide all parameters, you will get an error:

test

fn f(x: Length, y: Length, z: Length) {}
f(x = 1cm, z = 3cm); // error: y is missing here

Too Many Arguments

When you provide all parameters but some are redundant, you will get a error too:

test

fn f(x: Length, y: Length, z: Length) {}
f(x = 1cm, y = 2cm, v = 5cm, z = 3cm); // error: Unexpected argument v

Ambiguous Arguments

If some arguments cannot be matched unambiguously to any of the parameters you will get an error.

test

fn f(x: Length, y: Length, z: Length) {}
f(x = 1cm, 5cm, 3cm); // error: Missing arguments y and z