When you call a class function but in the call you:
- Pass in wrong number of arguments
- Pass in a wrong datatype for the function parameter
(where xxx is the function name of the call)Error: Undefined function: xxx
In both cases, the error should reflect what the issue is.
The function IS defined, but the caller is using it wrong. So the errors should be as in TD 6.3 and earlier versions:
The compiler should decide what error to show and state the actual state: if there is no function with that name it should throw "Undefined function". If there is a function having that name it should throw one of the errors as in TD63.Error: Function call has wrong number of arguments.
Error: Function argument 1 does not match declared data type. Check for possible name conflict.
I know TD70 allows function overloading and the parameters in the call should match the overloaded function having the exact number of params and their types. But the error shown now is clearly incorrect as the function DOES exist and should throw what is really the case here.
See testcases. There is a TD63 and TD70 version (same code) but they throw different error messages where in TD70 it is confusingly wrong.
This is registered by OpenText as:
Ticket # 3041379: Compile error "Undefined function: ..." is confusingly wrong
TD-23561 : Irrelevant error message "Undefined function" was encountered when passing wrong parameter's datatype to a class function call