Informix Error -4136
-4136 Intrinsic function name() has wrong signature.
The correct signature for a !copy() function is FUNCTION !copy (obj this_class), having one parameter whose type is an object of the containing class. The correct signature for a !derive() function has no arguments, only a pair of parentheses.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4136 fires when !copy() or !derive() is declared with the wrong signature — per the
official guidance, !copy() must take exactly one parameter, an object of the containing
class (FUNCTION !copy (obj this_class)), and !derive() must take no arguments at all.
!copy()declared with a parameter list other than one object of the containing class, per the official guidance — the first named case.!derive()declared with any arguments, per the official guidance — the second named case.
Solutions / Resolution
- Declare
!copy()with exactly one parameter, an object of the containing class. - Declare
!derive()with an empty parameter list.
Examples
An incorrectly-signed !copy()
CLASS Order
FUNCTION !copy(a INTEGER, b INTEGER)
-- -4136: !copy() must take one parameter of type Order
END FUNCTION
END CLASS
Corrected
CLASS Order
FUNCTION !copy(src Order)
...
END FUNCTION
END CLASS
Diagnostic Checks
- Check every
!copy()declaration for exactly one parameter of the containing class, and every!derive()declaration for no parameters at all.
Related Errors / Related Topics
- -4013 — "Invalid intrinsic member function "!name"." A related intrinsic member-function error, about the function's name being invalid rather than its signature.
- -4014 — "You cannot specify the RETURNING type for intrinsic member functions." A
related intrinsic member-function error, about an illegal
RETURNINGclause rather than an illegal parameter list.
!copy() or !derive() has the wrong signature — !copy() takes one parameter of the
containing class; !derive() takes none.