Informix Error -4001: Fundamental type name "type" cannot be used as a class name.
Cause and resolution
Fundamental type name "type" cannot be used as a class name.
This CLASS statement attempts to declare a class with the same name as a built-in data type such as INTEGER. Find a different name for your class.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4001 fires when a CLASS statement declares a class using the same name as a built-in data
type such as INTEGER — per the official guidance, this collides with the compiler's
fundamental type names.
- A class declared with the same name as a built-in fundamental type, per the official guidance — the direct, only cause.
Solutions / Resolution
- Find a different name for the class, per the official guidance.
Examples
A class named after a built-in type
CLASS INTEGER
...
END CLASS
-- -4001: INTEGER is a fundamental type name
Corrected
CLASS OrderQuantity
...
END CLASS
Diagnostic Checks
- Check the class name against the language's fundamental type names
(
INTEGER,CHAR,DECIMAL, etc.), and rename the class if it collides.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4001 in this set yet.
A class was declared with the same name as a built-in fundamental type — choose a different class name.