@abaplint/transpiler 2.3.64 → 2.3.65

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.
@@ -94,6 +94,12 @@ class MethodImplementationTranspiler {
94
94
  const method = this.findMethod(methodName, classDef, traversal);
95
95
  let staticMethod = "";
96
96
  methodName = methodName.replace("~", "$").toLowerCase();
97
+ const superDef = traversal.findClassDefinition(classDef === null || classDef === void 0 ? void 0 : classDef.getSuperClass(), scope);
98
+ for (const a of (superDef === null || superDef === void 0 ? void 0 : superDef.getAliases().getAll()) || []) {
99
+ if (a.getName().toLowerCase() === methodName) {
100
+ methodName = a.getComponent().replace("~", "$").toLowerCase();
101
+ }
102
+ }
97
103
  if (method && method.isStatic()) {
98
104
  // in ABAP static methods can be called with instance arrows, "->"
99
105
  const className = (_b = (_a = scope.getParent()) === null || _a === void 0 ? void 0 : _a.getIdentifier().sname) === null || _b === void 0 ? void 0 : _b.toLowerCase();
@@ -34,7 +34,7 @@ export declare class Traversal {
34
34
  buildConstructorContents(scope: abaplint.ISpaghettiScopeNode | undefined, def: abaplint.IClassDefinition): string;
35
35
  findInterfaceDefinition(name: string, scope: abaplint.ISpaghettiScopeNode | undefined): abaplint.IInterfaceDefinition | undefined;
36
36
  findTable(name: string): abaplint.Objects.Table | undefined;
37
- findClassDefinition(name: string, scope: abaplint.ISpaghettiScopeNode | undefined): abaplint.IClassDefinition | undefined;
37
+ findClassDefinition(name: string | undefined, scope: abaplint.ISpaghettiScopeNode | undefined): abaplint.IClassDefinition | undefined;
38
38
  private dataFromInterfaces;
39
39
  determineType(node: abaplint.Nodes.ExpressionNode | abaplint.Nodes.StatementNode, scope: abaplint.ISpaghettiScopeNode | undefined): abaplint.AbstractType | undefined;
40
40
  isInsideLoop(node: abaplint.Nodes.StatementNode): boolean;
@@ -295,7 +295,10 @@ class Traversal {
295
295
  return tabl;
296
296
  }
297
297
  findClassDefinition(name, scope) {
298
- let clas = scope === null || scope === void 0 ? void 0 : scope.findClassDefinition(name);
298
+ if (name === undefined || scope === undefined) {
299
+ return undefined;
300
+ }
301
+ let clas = scope.findClassDefinition(name);
299
302
  if (clas === undefined) {
300
303
  const iglobal = this.reg.getObject("CLAS", name);
301
304
  clas = iglobal === null || iglobal === void 0 ? void 0 : iglobal.getDefinition();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.3.64",
3
+ "version": "2.3.65",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",