Informix Error -4661
-4661 Access control restrictions are not allowed for this intrinsic member
function.The intrinsic member functions !copy() and !derive() must have PUBLIC access control, which is the default access control for member functions.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4661 fires when an access-control keyword (other than PUBLIC) is applied to !copy() or
!derive() — per the official guidance, these intrinsic member functions must have PUBLIC
access control, which is already the default for member functions.
- An explicit non-
PUBLICaccess control specifier on!copy()or!derive(), per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the access-control restriction, per the official guidance, or make it
explicitly
PUBLIC— the same as the default.
Examples
A restricted intrinsic member function
CLASS Order
PRIVATE !copy()
-- -4661: !copy() must be PUBLIC
END CLASS
Corrected
CLASS Order
!copy()
END CLASS
Diagnostic Checks
- Check
!copy()/!derive()declarations for a non-PUBLICaccess-control keyword, and remove it.
Related Errors / Related Topics
- -4013 — "Invalid intrinsic member function "!name"." A related intrinsic member-function error, about the function name itself being invalid rather than its access control.
- -4498 — "Event/Handler name must be different from intrinsic member function name." A related intrinsic member-function restriction, about naming collisions rather than access control.
An access-control keyword was applied to !copy()/!derive(), which must stay PUBLIC —
remove the restriction.