Previous Topic Next topic Print topic


COBCH1717 Best visible static overload found in <type-name> is <member-name> which has invalid parameter <param-num>

The specified type has no static method with matching parameters. The error message shows the method with the best match, and indicates the parameter that fails to match.

In the following example, there is no compatible match for the call to messageEnd using the arguments supplied. There is a method with the correct name and same number of parameters; however, the second parameter is not a compatible match. Either change the argument to a type compatible with decimal, or change the messageEnd method to accept a type compatible with string as its second parameter.

class-id myClass.
method-id main static.
 invoke self::messageEnd(4 "Installation Complete")
end method.
method-id messageEnd (s as decimal t as decimal) static.
...
end method.
end class.

This error is produced in a context in which a static method would be allowed.

Previous Topic Next topic Print topic