Synopsis A field name is used that has not been declared.
Description Fields of Rascal:Tuple (hence also of Rascal:Relation and Rascal:ListRelation) and constructors of Rascal:AlgebraicDataTypes may have names. This error is generated when a reference is made to an undeclared field.

  • Fix the field name in the reference.
  • Declare a new field as used in the reference.
Examples Use of the undeclared field gender:
rascal>tuple[str name, int age] Jo = <"Jo", 33>;
tuple[str name,int age]: <"Jo",33>
|stdin:///|(0,2,<1,0>,<1,2>): Undeclared field: gender for tuple[str name,int age]
A similar example now expressed as ADT:
rascal>data Person = person(str name, int age);
rascal>jo = person("Jo", 33);
Person: person("Jo",33)
|stdin:///|(0,2,<1,0>,<1,2>): Undeclared field: gender for Person
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit