# E3021

Compiler diagnostic name: `invalid_warn_list`.

Invalid warning list.

MoonBit warning lists are strings that enable or disable warnings by name or
number. They are accepted in places such as `moon.pkg.json` `warn-list` and the
`#warnings` attribute. This error happens when the warning list cannot be
parsed, for example because it contains an unknown warning name or malformed
syntax.

## Erroneous example

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

`does_not_exist` is not a known warning name.

## Suggestion

Use a valid warning name or warning number. Warning names are the identifiers
shown in compiler diagnostics, such as `unused_value`.

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