Skip to content
Playground(another site)

bynk.resolve.unknown_field

Error A record construction names a field the record type does not declare.

A record construction names a field the record type does not declare. A record's fields are fixed by its type declaration, and a literal may set only those. This is usually a typo in the field name, or a field meant for a different type. Reading a field a value does not have is the sibling code bynk.types.unknown_field.

Example

type User = { name: String, age: Int }
User { name: "Ada", age: 36, admin: true } // ✗ no field `admin`
User { name: "Ada", age: 36 } // ✓ only the declared fields

In the Book

See also