# XO0434: an invalid catch-all variant of a valued enum

A valued enum's variants are field-less, except one: its last variant may keep the values no other variant names, as `Unknown(value: Str)` (one field of the enum's value type, `Str` or `Int`, and no `= value`). `E.from(v)` returns it for an unlisted value, `value()` is its field, `all()` leaves it out, and `derive Json` reads and writes the value it keeps. Move the variant last, give it one field of the value type, or drop its value. See core 2.3 and decisions 0269 and 0493.

## Example

```xo
enum StorageClass: Str {
  Unknown(value: Str)
  Standard = "STANDARD"
}
```

## Fix

```xo
enum StorageClass: Str {
  Standard = "STANDARD"
  Unknown(value: Str)
}
```

Run `xo explain XO0434` for this text in a terminal, or see
[section 10.6 of the specification](../../spec/core/#106-diagnostic-codes).

