@abaplint/transpiler 2.7.124 → 2.7.126

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.
@@ -59,6 +59,15 @@ class MethodImplementationTranspiler {
59
59
  after += `if (${varName}.getQualifiedName === undefined || ${varName}.getQualifiedName() !== "${(_a = identifier.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toUpperCase()}") { ${varName} = undefined; }\n`;
60
60
  }
61
61
  after += `if (${varName} === undefined) { ${varName} = ${new transpile_types_1.TranspileTypes().toType(identifier.getType())}.set(${unique}.${varName}); }\n`;
62
+ }
63
+ else if (identifier.getMeta().includes("importing" /* abaplint.IdentifierMeta.MethodImporting */)
64
+ && type.isGeneric() === true) {
65
+ if (isOptional === true) {
66
+ after += `let ${varName} = ${unique}?.${varName} || ${new transpile_types_1.TranspileTypes().toType(identifier.getType())};\n`;
67
+ }
68
+ else {
69
+ after += `let ${varName} = ${unique}?.${varName};\n`;
70
+ }
62
71
  // end new
63
72
  }
64
73
  else if (identifier.getMeta().includes("importing" /* abaplint.IdentifierMeta.MethodImporting */)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.7.124",
3
+ "version": "2.7.126",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",