@abaplint/core 2.105.24 → 2.105.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.
|
@@ -469,8 +469,14 @@ class TypeUtils {
|
|
|
469
469
|
if (source instanceof basic_1.TableType && source.isWithHeader() === false) {
|
|
470
470
|
return false;
|
|
471
471
|
}
|
|
472
|
+
else if ((target instanceof basic_1.StringType || target instanceof basic_1.CharacterType)
|
|
473
|
+
&& source instanceof basic_1.StructureType
|
|
474
|
+
&& this.isCharLike(source)) {
|
|
475
|
+
return true;
|
|
476
|
+
}
|
|
472
477
|
else if (source instanceof basic_1.DataReference
|
|
473
478
|
|| source instanceof basic_1.ObjectReferenceType
|
|
479
|
+
|| source instanceof basic_1.StructureType
|
|
474
480
|
|| source instanceof basic_1.GenericObjectReferenceType) {
|
|
475
481
|
return false;
|
|
476
482
|
}
|
|
@@ -42,8 +42,8 @@ class ReadTable {
|
|
|
42
42
|
const fromSource = node.findExpressionAfterToken("FROM");
|
|
43
43
|
if (fromSource) {
|
|
44
44
|
const fromType = new source_1.Source().runSyntax(fromSource, scope, filename);
|
|
45
|
-
if (new _type_utils_1.TypeUtils(scope).isAssignable(fromType,
|
|
46
|
-
throw new Error("READ TABLE, FROM must be
|
|
45
|
+
if (new _type_utils_1.TypeUtils(scope).isAssignable(fromType, rowType) === false) {
|
|
46
|
+
throw new Error("READ TABLE, FROM must be compatible");
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
for (const s of sources) {
|
|
@@ -68,7 +68,7 @@ class ReadTable {
|
|
|
68
68
|
}
|
|
69
69
|
else if (t) {
|
|
70
70
|
const targetType = new target_1.Target().runSyntax(t, scope, filename);
|
|
71
|
-
if (new _type_utils_1.TypeUtils(scope).
|
|
71
|
+
if (new _type_utils_1.TypeUtils(scope).isAssignable(rowType, targetType) === false) {
|
|
72
72
|
throw new Error("Incompatible types");
|
|
73
73
|
}
|
|
74
74
|
}
|
package/build/src/registry.js
CHANGED