# E0093

Warning name: `unknown_constr_pat_on_exhaustive_type`

A `Type::..` pattern is used with an enum that is not marked
`#non_exhaustive`. Closed enums have no unknown future constructor for this
pattern to match, so the pattern is meaningless.

## Erroneous example

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

## Suggestion

Remove the `Type::..` case from a closed enum match. If the enum is a public
extension point whose defining package may add constructors in future releases,
mark its declaration with `#non_exhaustive`, match every currently known
constructor explicitly, and keep `Type::..` as the final compatibility case.

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