Closed zhangyuanlin closed 6 years ago
I will fix this soon. It is clearly a bug. There will not be a syntax error. I will have to catch it as a semantic error.
Questions about how to handle this scenario:
instance: universe * nodes -> booleans
- Is the user allowed to use the name 'instance' for a user defined function if the signature is different than the special function instance: universe * nodes -> booleans
CALM does not allow "overload" a function name, right? If so, I think we won't allow programmer to use instance as a function name.
- Should this be an undefined function error, or a misuse of the special function error?
The latter. Points 1 and 2 should apply to other special functions too.
The fix for this will be in the next calm.jar release. This particular issue is now fixed in code.
CALM doesn't complain about instance(X) (last line in the program below).
Sort seems to be missing from the literal (intended: instance(X, names)).
Program: