# E4100

The type is not a trait.

This error occurs when you define an alias for a type and use it as a trait.
As it is impossible to use a type as a trait,
this error might hint at a typo in your code.

## Erroneous example

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

## Suggestion

If there is a typo, use a correct trait where the error occurs.

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

Only traits can appear after `:` in a trait declaration.
