# E4225

Compiler diagnostic name: `constr_any_pattern_not_suberror`.

The wildcard constructor pattern `Type::_` does not name a usable suberror
type.

This pattern stands for all visible constructors of one suberror type. The
named type must therefore be a suberror with at least one constructor, and its
constructors must be visible at the pattern's use site. It cannot be an
ordinary enum, struct, built-in type, empty suberror, or opaque suberror whose
constructors are unavailable.

## Erroneous example

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

## Suggestion

Name a visible, non-empty suberror type. If the value is not an error, use that
type's ordinary patterns instead.

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