# E4135

Inconsistent `impl` of trait: implementations have different constraints.

When implementing a trait for a type, all implementations must have the same
constraints. If the two constraints has intersection, then it would be unclear
which implementation to use for types that satisfy both constraints.

## Erroneous example

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

## Suggestion

One way to resolve this issue is to pick one of the implementations and remove
the other:

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

If you want to implementation for both constraints, you can create a new trait
that combines the constraints:

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

And manually implement the trait for all the types that satisfy the constraints (`ByteSize` or `WordSize`).
