Informix Error -4499: Member "name" is already declared in the class or in its base class.
Cause and resolution
Member "name" is already declared in the class or in its base class.
Either a member called "name" already exists in the current class, and you have attempted to declare another member with that name, or you are attempting to override an event or a variable. Only member functions can be overridden.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4499 fires in one of two situations — per the official guidance, either a member called "name" already exists in the current class (declared again, directly), or the declaration is attempting to override an event or a variable inherited from a base class, which isn't supported.
- A member with the same name already exists in the current class, per the official guidance — the direct, first case.
- An attempt to override an inherited event or variable, per the official guidance — only member functions can be overridden.
Solutions / Resolution
- Rename the new member, or remove the duplicate declaration, if the collision is within the current class.
- Don't attempt to override an inherited event or variable — per the official guidance, only member functions support overriding.
Examples
Attempting to override an inherited variable
CLASS Base
DEFINE status CHAR(10)
END CLASS
CLASS Derived : Base
DEFINE status CHAR(10)
-- -4499: "status" is inherited from Base and cannot be overridden
END CLASS
Diagnostic Checks
- Check the current class and its base class(es) for an existing member of the same name, and confirm whether the intent was a genuine override — only member functions permit that.
Related Errors / Related Topics
- -4025 — "Function "name" is already declared in the class." A related duplicate-declaration error, specific to functions rather than any class member.
- -4497 — "Event "name" is already declared in the class." A related duplicate-declaration error, specific to events rather than any class member.
A class member name collides with an existing member in the class or its base class, or attempts to override a non-function member — only member functions can be overridden.