Cause
This error occurs if you are passing a parameter to a method (the actual parameter) but the parameter does not match the type of the corresponding parameter in the method definition (the formal parameter).
The meaning of this error depends on the definition of the parameter, as follows.
For parameters defined as input or constant, it must be possible to assign the actual parameter to the formal parameter, as follows.
For composite (non-primitive) parameters, the class of the actual parameter must be the same as, or a subclass of, the class of the formal parameter.
For primitive parameters, the actual parameter must be of a type that is assigned to the type of the formal parameter.
For parameters defined as output, it must be possible to assign the formal parameter to the actual parameter, as follows:
For composite (non-primitive) parameters, the class of the formal parameter must be the same as, or a subclass of, the class of the actual parameter.
For primitive parameters, the formal parameter must be of a type that is assigned to the type of the actual parameter.
For parameters defined as io, it must be possible to assign in both directions, as follows:
For composite (non-primitive) parameters, the class of the formal parameter must be identical to the class of the actual parameter.
For primitive parameters, the formal parameter must be of a type that is assigned to the type of the actual parameter, and the reverse must be true.
For full details about assignment compatibility rules, see "
Action
Make the parameter types compatible, by correcting the parameter being passed or the method definition.