A method and computer program product for detecting and diagnosing errors
in a generic function call and then presenting them in an error message
is disclosed. A generic function call is provided for evaluation. A
corresponding generic function definition containing sets of dummy
arguments that define arguments signatures for associated specific
functions is also provided. In a first sorting the generic function call
is compared with the argument signatures to determine whether the generic
function call contains errors. A second sorting is then used to determine
the nature of the errors. An error message describing the nature of the
errors is then generated.