E4030

E4030#

The record type does not have the specified field.

Erroneous Example#

struct T { a : Int }
let t : T = { a: 42 }
let u : T = { ..t, b: 43 }

The example above tries to assign an updated record with a field b to a variable u of type T, but this field doesn't exist, giving the following error on line 3:

The record type T does not have the field b.

Suggestion#

Make sure to use the correct field instead:

struct T { a : Int }
let t : T = { a: 42 }
let u : T = { ..t, a: 43 }