XO0435: a catch-all variant built from a value a named variant has
The catch-all keeps only values no variant names. Built from a value a named variant has, it would be a second spelling of that variant, and it compares unequal to it (equality is by variant). Write the named variant, or E.from(v), which picks it. See core 2.3 and decision 0493.
Example
enum StorageClass: Str {
Standard = "STANDARD"
Unknown(value: Str)
}
const S: StorageClass = StorageClass.Unknown("STANDARD")Fix
enum StorageClass: Str {
Standard = "STANDARD"
Unknown(value: Str)
}
const S: StorageClass = StorageClass.StandardRun xo explain XO0435 for this text in a terminal, or see
section 10.6 of the specification.