Skip to content
Playground(another site)

bynk.resolve.duplicate_field

Error A record, or one variant's payload, declares a field twice.

A record is built and read by field name, so each name may appear once in its declaration, and the same holds for the payload fields of one sum variant. A repeat usually means two different fields were intended: rename one, or remove it. A field set twice in a literal is bynk.resolve.duplicate_field_init.

Example

type Order = { id: Int, id: String } // ✗ `id` declared twice
type Order = { id: Int, label: String } // ✓ distinct names

In the Book

See also

  • The grammar rule it governs: record_type.
  • Every code in its category, Resolution, on the diagnostic index.
  • bynk explain bynk.resolve.duplicate_field shows the same from the installed toolchain, without a network.