# E4046

A public definition cannot depend on private entities.

## Erroneous Example

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

The above example tries to implement a private trait `I` for the type `Int`,
but the implementation itself is public, which is not allowed.
This gives the following error on line 2:

```
A public definition cannot depend on private trait
```

## Suggestion

Adjust the visibility of the trait or the implementation to match:

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