@abaplint/core 2.84.8 → 2.84.9

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.
@@ -12,7 +12,7 @@ class TypeTable extends combi_1.Expression {
12
12
  const normal1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE", (0, combi_1.opt)("OF"), (0, combi_1.opt)("REF TO"), (0, combi_1.opt)(_1.TypeName));
13
13
  const likeType = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("STANDARD", "HASHED", "INDEX", "SORTED", "ANY")), "TABLE OF", (0, combi_1.optPrio)("REF TO"), (0, combi_1.opt)(field_chain_1.FieldChain), (0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))));
14
14
  const rangeType = (0, combi_1.seq)("RANGE OF", _1.TypeName, (0, combi_1.opt)(header), (0, combi_1.opt)(initial));
15
- const rangeLike = (0, combi_1.seq)("RANGE OF", _1.FieldSub, (0, combi_1.opt)(header), (0, combi_1.opt)(initial));
15
+ const rangeLike = (0, combi_1.seq)("RANGE OF", _1.SimpleFieldChain, (0, combi_1.opt)(header), (0, combi_1.opt)(initial));
16
16
  const typetable = (0, combi_1.seq)(normal1, (0, combi_1.opt)((0, combi_1.per)(header, initial, (0, combi_1.plusPrio)(type_table_key_1.TypeTableKey))));
17
17
  const occurs = (0, combi_1.seq)("OCCURS", _1.Integer);
18
18
  const oldType = (0, combi_1.seq)((0, combi_1.opt)("REF TO"), _1.TypeName, (0, combi_1.alt)((0, combi_1.seq)(occurs, (0, combi_1.opt)(header)), header));
@@ -282,7 +282,7 @@ class BasicTypes {
282
282
  return new Types.TableType(structure, options);
283
283
  }
284
284
  else if (text.startsWith("LIKE RANGE OF ")) {
285
- const sub = node.findFirstExpression(Expressions.FieldSub);
285
+ const sub = node.findFirstExpression(Expressions.SimpleFieldChain);
286
286
  found = this.resolveLikeName(sub);
287
287
  if (found === undefined) {
288
288
  return new Types.UnknownType("LIKE RANGE OF, could not resolve type");
@@ -76,7 +76,10 @@ class ReadTable {
76
76
  */
77
77
  const t = target.findFirstExpression(Expressions.Target);
78
78
  if (t) {
79
- new target_1.Target().runSyntax(t, scope, filename);
79
+ const targetType = new target_1.Target().runSyntax(t, scope, filename);
80
+ if (_type_utils_1.TypeUtils.isAssignable(rowType, targetType) === false) {
81
+ throw new Error("Incompatible types");
82
+ }
80
83
  return;
81
84
  }
82
85
  }
@@ -68,7 +68,7 @@ class Registry {
68
68
  }
69
69
  static abaplintVersion() {
70
70
  // magic, see build script "version.sh"
71
- return "2.84.8";
71
+ return "2.84.9";
72
72
  }
73
73
  getDDICReferences() {
74
74
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.84.8",
3
+ "version": "2.84.9",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -48,7 +48,7 @@
48
48
  "@microsoft/api-extractor": "^7.19.4",
49
49
  "@types/chai": "^4.3.0",
50
50
  "@types/mocha": "^9.1.0",
51
- "@types/node": "^17.0.12",
51
+ "@types/node": "^17.0.13",
52
52
  "chai": "^4.3.6",
53
53
  "eslint": "^8.7.0",
54
54
  "mocha": "^9.2.0",