Inheritance and type substitutability
In a type hierarchy, a subtype automatically inherits all the routines defined on its supertype. Consequently, if you call a routine with an argument of a subtype and no routines are defined on the subtype, the database server can invoke a routine that is defined on a supertype. Type substitutability refers to the ability to use an instance of a subtype when an instance of a supertype is expected. As an example, suppose that you create a routine p_info() that accepts an argument of type person_t and returns the last name and birthdate of an instance of type person_t. If no other p_info() routines are registered, and you invoke p_info() with an argument of type employee_t, the routine returns the name and birthdate fields (inherited from person_t) from an instance of type employee_t. This behavior is possible because employee_t inherits the functions of its supertype, person_t.
The process in which the database server searches for a routine that it can use is called routine resolution. For more information about routine resolution, see HCL Informix® User-Defined Routines and Data Types Developer's Guide.