# E4135

Inconsistent `impl` of trait: implementations have different self types or
constraints.

When implementing different methods of a trait for the same type, all
implementations must agree on the receiver type and type-parameter
constraints. If two implementations use different constraints, it is unclear
whether a type that satisfies both constraints has a complete and coherent
implementation.

## Erroneous example

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

## Suggestion

One way to resolve this issue is to make the implementations use the same
constraints:

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

If you want implementations for both constraints, create a new trait that
combines the constraints, and manually implement that trait for each type that
should satisfy it.
