# E4119

Compiler diagnostic name: `unknown_func_labelled_arg`.

This function is not a toplevel function, so it cannot have labelled arguments.

Only toplevel functions can declare or receive labelled arguments. Local
functions are inferred as ordinary function values, so a call such as `g(x~)`
is rejected when `g` is a local function parameter.

## Erroneous example

```{literalinclude} /sources/error_codes/4119_error/top.mbt
:language: moonbit
```

## Suggestion

Pass the value positionally when calling a local function value, or move the
function to the toplevel if you need labelled arguments.

```{literalinclude} /sources/error_codes/4119_fixed/top.mbt
:language: moonbit
```
