![]() |
|
Navigation |
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.
Remedies:
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; ok rascal>myint incr(myint n) = n + 1; myint (myint): myint incr(myint); rascal>incr(3); myint: 4 ![]() |