# E4029

This expression has a type which is not a variant.

## Erroneous Example

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

The example above tries to use `T::None` as a constructor pattern,
but `T` is a struct type, not an enum or enumview type,
giving the following error on line 5:

```
The type T is a struct type and not an enum or enumview.
```

## Suggestions

Make sure to use a value of the correct type instead:

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