Informix Error -4000
-4000 Intrinsic member functions cannot be declared as SHARED.
This statement attempts to declare one of the intrinsic members of this class (the class constructor, or the !copy() or !derive() function) as SHARED. You can declare these functions in order to extend them, but the declaration cannot specify SHARED.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4000 fires when a class's intrinsic member function — the constructor, !copy(), or
!derive() — is declared SHARED — per the official guidance, these functions can be
declared in order to extend them, but the declaration can't specify SHARED.
- A class constructor,
!copy(), or!derive()declared withSHARED, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove
SHAREDfrom the intrinsic member function's declaration, per the official guidance — the function can still be declared to extend it, just not asSHARED.
Examples
An intrinsic member declared SHARED
DEFINE SHARED FUNCTION !new()
-- -4000: the constructor cannot be SHARED
Corrected
DEFINE FUNCTION !new()
Diagnostic Checks
- Check every declaration of a constructor,
!copy(), or!derive(), and removeSHAREDfrom any of them.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4000 in this set yet.
An intrinsic member function (constructor, !copy(), or !derive()) was declared SHARED —
remove SHARED from its declaration.