Navigation
Synopsis Attempt to apply a operation to a value for which the operation is not defined.
Description This error is generated when an unsupported operation is applied to (a combination of) values. There can be many causes for this as illustrated below.

Remedies:
  • Change the operation to another operations that is supported on the given values.
  • Change the values so that the operation can be applied to them.
  • Rewrite the expression compleye to get the effect you intended.
Examples
rascal>L = [1,2,3];
list[int]: [1,2,3]
Division is not supported on lists:
rascal>[1, 2, 3] / 4;
|stdin:///|(12,1,<1,12>,<1,13>): division not supported on list[int] and int
Combined multiplication and assignment is not supported either:
rascal>L *= 3;
|stdin:///|(5,1,<1,5>,<1,6>): multiplication not supported on list[int] and list[int]
Taking the time from a date-only value is not supported:
rascal>$2010-07-15.justTime;
                   ^ Parse error here
Calling an integer as a function is not supported:
rascal>17(3, "abc");
|stdin:///|(6,5,<1,6>,<1,11>): A value of type int is not something you can call like a function, a constructor or a closure.
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 ask.rascal-mpl.org.