Informix Error -4058: Symbol with constructor name is not a function.
Cause and resolution
Symbol with constructor name is not a function.
A class name that is followed by the name of a member variable or constant is not allowed in this context.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4058 fires when a class name is followed by the name of a member variable or constant in a context where that's not allowed — per the official guidance, a class name followed by a non-function member name isn't a valid construct there.
- A class name followed by a member variable/constant name where a function call is expected, per the official guidance — the direct, only cause.
Solutions / Resolution
- Review the statement and use the correct syntax for accessing the class's member variable/constant, rather than treating the class name as if invoking its constructor with that name.
Examples
A class name followed by a non-function member
LET x = Order.maxItems
-- -4058: maxItems is a member constant, not something invoked via Order(...)
Corrected
LET x = Order::maxItems
Diagnostic Checks
- Check the context in which a class name is followed by a member name, and use the correct access syntax for that member's kind.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4058 in this set yet.
A class name is followed by a member variable/constant name in an invalid context — use the correct member-access syntax instead.