bynk.resolve.duplicate_variant
Error A sum type declares a variant twice.
A sum value is identified by its variant name: in a match pattern, in a constructor, and as the kind of its JSON form. So each variant appears once in a type. A repeat is usually two different variants meant, or a line pasted twice. Rename one of them, or delete the repeat. A payload field repeated within one variant is bynk.resolve.duplicate_field.
Example
type Colour = | Red | Red // ✗ `Red` declared twice
type Colour = | Red | Green // ✓ distinct variantsIn the Book
See also
- The grammar rule it governs:
sum_type. - Every code in its category, Resolution, on the diagnostic index.
bynk explain bynk.resolve.duplicate_variantshows the same from the installed toolchain, without a network.