# E0090

Warning name: `unused_lexcase`

A `lexmatch` or `lexscan` branch can never be selected.

This happens when an earlier branch takes precedence for every input matched by
the later branch, or when the branch's regex matches no input. An unnecessary
catch-all after exhaustive regex cases produces the same warning.

## Erroneous example

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

The first branch already handles every string that starts with `"ab"`, so the
second branch is unreachable under first-match semantics.

## Suggestion

Remove the unreachable branch, or move a more specific regex before the branch
that shadows it.

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