@abaplint/transpiler 2.5.25 → 2.5.26

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.
@@ -42,10 +42,14 @@ class MethodImplementationTranspiler {
42
42
  }
43
43
  after = after + new transpile_types_1.TranspileTypes().declare(identifier) + "\n";
44
44
  const type = identifier.getType();
45
- const charOne = type instanceof abaplint.BasicTypes.CharacterType && type.getLength() === 1;
45
+ // todo, type X is also generic in method definitions, the real fix will be in abaplint
46
+ const charGeneric = type instanceof abaplint.BasicTypes.CharacterType
47
+ && type.getLength() === 1
48
+ && type.getDDICName() === undefined
49
+ && type.getQualifiedName() === undefined;
46
50
  if (identifier.getMeta().includes("importing" /* abaplint.IdentifierMeta.MethodImporting */)
47
51
  && type.isGeneric() === false
48
- && charOne === false) {
52
+ && charGeneric === false) {
49
53
  after += "if (" + unique + " && " + unique + "." + varName + ") {" + varName + ".set(" + unique + "." + varName + ");}\n";
50
54
  }
51
55
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.5.25",
3
+ "version": "2.5.26",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",