Parameters match widened data types
- Last Updated: October 8, 2020
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
ABL always searches for an exact parameter match, but if none is found, it will accept the closest parameter match according to widening in the available method or constructor overloads at compile time. Failure to find a match raises a compile-time error. For more information on matching parameter data types with widening, see the Parameter passing syntax reference entry in ABL Reference.
The examples that follow show how widening can resolve calls to overloaded methods (or constructors):
|
When the following procedure calls the setVal( ) method
with a given parameter, the overloaded method definition that it matches
corresponds to the bold-faced number referenced in the comments:
|