# E4141

This form of application is invalid for the argument, because it is not
declared as optional.

This error happens when you try to forward an optional value to an argument to a
function. This is only allowed when the argument is declared as optional
argument. Even if the argument is declared as a labelled argument with default
value, it is not allowed to forward an optional value to it.

## Erroneous example

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

## Suggestion

If you have control over the function you wish to call, you can change the argument
to be optional.

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

However, if you does not have control over the function, you can unwrap the
optional value before passing it to the function.

```{literalinclude} /sources/error_codes/4141_fixed/top_1.mbt
:language: moonbit
```
