@abaplint/core 2.106.0 → 2.106.2
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.
|
@@ -50,8 +50,15 @@ class Append {
|
|
|
50
50
|
else if (targetType instanceof basic_1.VoidType) {
|
|
51
51
|
rowType = targetType;
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
let sourceType = new source_1.Source().runSyntax(source, scope, filename, rowType);
|
|
54
54
|
if (node.findDirectTokenByText("LINES")) {
|
|
55
|
+
// hmm, checking only the row types are compatible will not check the table type, e.g. sorted or hashed
|
|
56
|
+
if (sourceType instanceof basic_1.TableType) {
|
|
57
|
+
sourceType = sourceType.getRowType();
|
|
58
|
+
}
|
|
59
|
+
if (targetType instanceof basic_1.TableType) {
|
|
60
|
+
targetType = targetType.getRowType();
|
|
61
|
+
}
|
|
55
62
|
if (new _type_utils_1.TypeUtils(scope).isAssignable(sourceType, targetType) === false) {
|
|
56
63
|
throw new Error("Incompatible types");
|
|
57
64
|
}
|
|
@@ -36,13 +36,11 @@ class Concatenate {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
throw new Error("Source type not compatible");
|
|
45
|
-
}
|
|
39
|
+
for (const s of node.findDirectExpressions(Expressions.SimpleSource3)) {
|
|
40
|
+
const type = new source_1.Source().runSyntax(s, scope, filename);
|
|
41
|
+
const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLikeStrict(type);
|
|
42
|
+
if (compatible === false) {
|
|
43
|
+
throw new Error("Source type not compatible");
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
46
|
}
|
|
@@ -13,7 +13,8 @@ class ModifyInternal {
|
|
|
13
13
|
new source_1.Source().runSyntax(s, scope, filename);
|
|
14
14
|
}
|
|
15
15
|
// there is only one
|
|
16
|
-
const
|
|
16
|
+
const target = node.findFirstExpression(Expressions.Target);
|
|
17
|
+
const targetExpression = target;
|
|
17
18
|
if (targetExpression) {
|
|
18
19
|
// it might be a dynamic target
|
|
19
20
|
const targetType = new target_1.Target().runSyntax(targetExpression, scope, filename);
|
|
@@ -30,13 +31,19 @@ class ModifyInternal {
|
|
|
30
31
|
throw new Error("Table does not have header line");
|
|
31
32
|
}
|
|
32
33
|
}
|
|
34
|
+
else if (targetType instanceof basic_1.StructureType) {
|
|
35
|
+
// it might originate from a TABLES statement
|
|
36
|
+
if (target.concatTokens().toUpperCase() !== targetType.getDDICName()) {
|
|
37
|
+
throw new Error("Not an internal table");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
33
40
|
else {
|
|
34
41
|
throw new Error("Not an internal table");
|
|
35
42
|
}
|
|
36
43
|
}
|
|
37
|
-
const
|
|
38
|
-
if (
|
|
39
|
-
new fstarget_1.FSTarget().runSyntax(
|
|
44
|
+
const fstarget = node.findDirectExpression(Expressions.FSTarget);
|
|
45
|
+
if (fstarget) {
|
|
46
|
+
new fstarget_1.FSTarget().runSyntax(fstarget, scope, filename, undefined);
|
|
40
47
|
}
|
|
41
48
|
for (const t of node.findDirectExpressions(Expressions.ComponentCond)) {
|
|
42
49
|
new component_cond_1.ComponentCond().runSyntax(t, scope, filename);
|
package/build/src/registry.js
CHANGED