Previous Topic Next topic Print topic


COBCH1718 Best visible constructor in <type-name> is <member-name> which has invalid parameter <param-num>

The specified type has no constructor with matching parameters. The error message shows the constructor 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 the new constructor using the argument supplied. There is a constructor with the same number of parameters; however, the parameter is not a compatible match. Either change the argument to be compatible with type string, or change the new constructor to accept a type compatible with a numeric.

class-id axel.
method-id main.
  declare obj as type axel
  set obj to new axel(3)
end method.
method-id new (s as string).
...
end method.
end class.
Previous Topic Next topic Print topic