E4033

E4033#

There is no struct definition with the specified fields.

Erroneous Example#

pub struct S {
  x : Int
  y : Int
}

pub let c = { x: 2, w: 1 }

The example above tries to assign a struct with fields x and w to a variable c, but this field doesn't exist in any known struct type, giving the following error on line 3:

There is no struct definition with the fields: x, w.

Suggestion#

Make sure to use the correct field identifiers instead:

pub struct S {
  x : Int
  y : Int
}

pub let c : S = { x: 2, y: 1 }