@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.
@@ -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
- return true;
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.11.61",
3
+ "version": "2.11.62",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",