Informix Error -4025: Function "name" is already declared in the class.
Cause and resolution
Function "name" is already declared in the class.
A function with the specified name has already been declared in the current class.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4025 fires when a function with the same name is declared more than once in the same class — per the official guidance, a function of the specified name has already been declared in the current class.
- The same function name declared twice within one class, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the duplicate declaration, or rename one of the two functions.
Examples
A duplicate function declaration
CLASS Order
FUNCTION save()
...
END FUNCTION
FUNCTION save()
-- -4025: save() is already declared above
END FUNCTION
END CLASS
Corrected
CLASS Order
FUNCTION save()
...
END FUNCTION
END CLASS
Diagnostic Checks
- Check the class for more than one declaration of the same function name, and remove or rename the duplicate.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4025 in this set yet.
A function name is declared twice in the same class — remove or rename the duplicate.