@abaplint/transpiler 2.1.2 → 2.1.5
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.
|
@@ -39,7 +39,11 @@ class MethodImplementationTranspiler {
|
|
|
39
39
|
unique = "INPUT";
|
|
40
40
|
}
|
|
41
41
|
after = after + new transpile_types_1.TranspileTypes().declare(identifier) + "\n";
|
|
42
|
-
|
|
42
|
+
const type = identifier.getType();
|
|
43
|
+
const charOne = type instanceof abaplint.BasicTypes.CharacterType && type.getLength() === 1;
|
|
44
|
+
if (identifier.getMeta().includes("importing" /* abaplint.IdentifierMeta.MethodImporting */)
|
|
45
|
+
&& type.isGeneric() === false
|
|
46
|
+
&& charOne === false) {
|
|
43
47
|
after += "if (" + unique + " && " + unique + "." + varName + ") {" + varName + ".set(" + unique + "." + varName + ");}\n";
|
|
44
48
|
}
|
|
45
49
|
else {
|
|
@@ -21,7 +21,7 @@ class SelectTranspiler {
|
|
|
21
21
|
ret.appendString(`let ${targetName} = new abap.types.Table(abap.DDIC["${from}"].type);\n`);
|
|
22
22
|
ret.appendChunk(new select_1.SelectTranspiler().transpile(selectStatement, traversal, targetName));
|
|
23
23
|
ret.appendString(`\nfor (const ${loopName} of ${targetName}.array()) {\n`);
|
|
24
|
-
ret.appendString(`${intoName
|
|
24
|
+
ret.appendString(`${intoName === null || intoName === void 0 ? void 0 : intoName.replace("-", ".get().")}.set(${loopName});\n`);
|
|
25
25
|
const body = node.findDirectStructure(abaplint.Structures.Body);
|
|
26
26
|
if (body) {
|
|
27
27
|
ret.appendChunk(traversal.traverse(body));
|