Closed richardpaynea55 closed 9 years ago
The floor issue is fine - was a problem with not bracketing! Changed to floor (n/3) is fine. However, still assume that the interpreter should catch mis-typed return values before being returned to action?
The error comes from the function evaluation. The last thing the function does when evaluated is that it converts the actual value to the expected one. Here it throws a ValueException
since they dont match. This is then thrown up and shown at the apply expression (floorTest(n))
since this was what cause it. The function is ok it is just partially defined so some values may lead to runtime errors.
The floor expression is not returning an integer/natural number when called in a function/operation in the interpreter, and the result type is not being checked upon completion of the function/operation.
Using the model below:
The error below is returned:
The same is true when calling the floor expression in an operation.