# E4056

Compiler diagnostic name: `method_duplicate`.

Method has already been defined. A type cannot define two methods with the same
name and receiver because a method call would have no single body to resolve to.

## Erroneous example

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

## Suggestion

Remove the duplicate method and keep only one method:

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