![]() |
|
Navigation |
Synopsis An annotation is used that has not been declared.
Description An Rascal:Declarations/Annotation can be used to add information to an instance of an Rascal:AlgebraicDataType.
An annotation has to declared beforehand. This error is generated when an undeclared annotation is used.
Remedies:
Examples This is correct:
rascal>data Fruit = apple(int n) | orange(int n); ok rascal>anno str Fruit @ quality; ok rascal>piece = orange(13); Fruit: orange(13) rascal>piece @ quality = "great"; Fruit: orange(13)[ @quality="great" ]But using a wrong annotation name generates an error: rascal>piece @ qual;
|stdin:///|(0,5,<1,0>,<1,5>): Undeclared annotation: qual on Fruit
![]() |