@abaplint/transpiler 2.13.57 → 2.13.58

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.
@@ -143,11 +143,15 @@ class MethodImplementationTranspiler {
143
143
  // it messes up promises when "this" is returned
144
144
  throw new Error(`Method name "then" not allowed`);
145
145
  }
146
- const superDef = traversal.findClassDefinition(classDef?.getSuperClass(), scope);
147
- for (const a of superDef?.getAliases() || []) {
148
- if (a.getName().toLowerCase() === methodName) {
149
- methodName = a.getComponent().replace("~", "$").toLowerCase();
146
+ let superClassName = classDef?.getSuperClass();
147
+ while (superClassName !== undefined) {
148
+ const superDef = traversal.findClassDefinition(superClassName, scope);
149
+ const alias = superDef?.getAliases().find(a => a.getName().toLowerCase() === methodName);
150
+ if (alias !== undefined) {
151
+ methodName = alias.getComponent().replace("~", "$").toLowerCase();
152
+ break;
150
153
  }
154
+ superClassName = superDef?.getSuperClass();
151
155
  }
152
156
  // https://github.com/tc39/proposal-class-fields
153
157
  let isPrivate = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.13.57",
3
+ "version": "2.13.58",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",