Synopsis Use of a type that has not been declared.
Description A type has to be declared before it can be used. This error is generated when an undeclared type is used.

  • Rename the type name.
  • Declare the type.
  • Import a module that declares the type. (Did you import all library modules?)
Examples Using the undeclared type myint gives an error:
rascal>myint incr(myint n) = n + 1;
|stdin:///|(0,5,<1,0>,<1,5>): Undeclared type: myint
The solkution is to first declares myint (here as an alias for int):
rascal>alias myint = int;
rascal>myint incr(myint n) = n + 1;
myint (myint): myint incr(myint);
myint: 4
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