@abaplint/transpiler 2.11.61 → 2.11.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/src/initialization.js +11 -1
- package/package.json +1 -1
|
@@ -106,8 +106,18 @@ export async function initializeABAP() {\n`;
|
|
|
106
106
|
// class constructors might make early use of eg. constants from interfaces
|
|
107
107
|
// sub classes will import() super classes and trigger a class constructor of the super
|
|
108
108
|
hasClassConstructor(reg, clas) {
|
|
109
|
+
/*
|
|
109
110
|
if (clas.getDefinition()?.getMethodDefinitions().getByName("CLASS_CONSTRUCTOR") !== undefined) {
|
|
110
|
-
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
*/
|
|
114
|
+
// also take local class definitions into account
|
|
115
|
+
for (const file of clas.getABAPFiles()) {
|
|
116
|
+
for (const cdef of file.getInfo().listClassDefinitions()) {
|
|
117
|
+
if (cdef.methods.some((m) => m.name.toUpperCase() === "CLASS_CONSTRUCTOR")) {
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
111
121
|
}
|
|
112
122
|
const sup = clas.getDefinition()?.getSuperClass();
|
|
113
123
|
if (sup !== undefined) {
|