bynk.types.unknown_field
Error Referenced a field the record type does not declare.
A field access names a field the value's type does not declare. A record's fields are fixed by its type declaration, so p.z on a Point of x and y is refused. This is usually a typo, or a value of a different type from the one intended. Building a record with a field it lacks is the sibling code bynk.resolve.unknown_field.
Example
type Point = { x: Int, y: Int }
fn height(p: Point) -> Int { p.z // ✗ `Point` has no field `z`}
fn height(p: Point) -> Int { p.y // ✓}In the Book
See also
- The grammar rule it governs:
field_access. - Every code in its category, Type checking, on the diagnostic index.
bynk explain bynk.types.unknown_fieldshows the same from the installed toolchain, without a network.