# E4014

Type Mismatch.

## Erroneous Example

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

The above example returns a value `b` of type `Y` on line 2,
which is not the same as the return type `X` of the function.

## Suggestion

Please make sure to return a value of the same type as the return type
of the function.

For instance, in the example above, you may write:

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