@abaplint/cli 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.
Files changed (2) hide show
  1. package/build/cli.js +25 -13
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -28321,8 +28321,15 @@ class Append {
28321
28321
  else if (targetType instanceof basic_1.VoidType) {
28322
28322
  rowType = targetType;
28323
28323
  }
28324
- const sourceType = new source_1.Source().runSyntax(source, scope, filename, rowType);
28324
+ let sourceType = new source_1.Source().runSyntax(source, scope, filename, rowType);
28325
28325
  if (node.findDirectTokenByText("LINES")) {
28326
+ // hmm, checking only the row types are compatible will not check the table type, e.g. sorted or hashed
28327
+ if (sourceType instanceof basic_1.TableType) {
28328
+ sourceType = sourceType.getRowType();
28329
+ }
28330
+ if (targetType instanceof basic_1.TableType) {
28331
+ targetType = targetType.getRowType();
28332
+ }
28326
28333
  if (new _type_utils_1.TypeUtils(scope).isAssignable(sourceType, targetType) === false) {
28327
28334
  throw new Error("Incompatible types");
28328
28335
  }
@@ -29160,13 +29167,11 @@ class Concatenate {
29160
29167
  }
29161
29168
  }
29162
29169
  }
29163
- else {
29164
- for (const s of node.findDirectExpressions(Expressions.SimpleSource3)) {
29165
- const type = new source_1.Source().runSyntax(s, scope, filename);
29166
- const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLikeStrict(type);
29167
- if (compatible === false) {
29168
- throw new Error("Source type not compatible");
29169
- }
29170
+ for (const s of node.findDirectExpressions(Expressions.SimpleSource3)) {
29171
+ const type = new source_1.Source().runSyntax(s, scope, filename);
29172
+ const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLikeStrict(type);
29173
+ if (compatible === false) {
29174
+ throw new Error("Source type not compatible");
29170
29175
  }
29171
29176
  }
29172
29177
  }
@@ -31079,7 +31084,8 @@ class ModifyInternal {
31079
31084
  new source_1.Source().runSyntax(s, scope, filename);
31080
31085
  }
31081
31086
  // there is only one
31082
- const targetExpression = node.findFirstExpression(Expressions.Target);
31087
+ const target = node.findFirstExpression(Expressions.Target);
31088
+ const targetExpression = target;
31083
31089
  if (targetExpression) {
31084
31090
  // it might be a dynamic target
31085
31091
  const targetType = new target_1.Target().runSyntax(targetExpression, scope, filename);
@@ -31096,13 +31102,19 @@ class ModifyInternal {
31096
31102
  throw new Error("Table does not have header line");
31097
31103
  }
31098
31104
  }
31105
+ else if (targetType instanceof basic_1.StructureType) {
31106
+ // it might originate from a TABLES statement
31107
+ if (target.concatTokens().toUpperCase() !== targetType.getDDICName()) {
31108
+ throw new Error("Not an internal table");
31109
+ }
31110
+ }
31099
31111
  else {
31100
31112
  throw new Error("Not an internal table");
31101
31113
  }
31102
31114
  }
31103
- const target = node.findDirectExpression(Expressions.FSTarget);
31104
- if (target) {
31105
- new fstarget_1.FSTarget().runSyntax(target, scope, filename, undefined);
31115
+ const fstarget = node.findDirectExpression(Expressions.FSTarget);
31116
+ if (fstarget) {
31117
+ new fstarget_1.FSTarget().runSyntax(fstarget, scope, filename, undefined);
31106
31118
  }
31107
31119
  for (const t of node.findDirectExpressions(Expressions.ComponentCond)) {
31108
31120
  new component_cond_1.ComponentCond().runSyntax(t, scope, filename);
@@ -51369,7 +51381,7 @@ class Registry {
51369
51381
  }
51370
51382
  static abaplintVersion() {
51371
51383
  // magic, see build script "version.sh"
51372
- return "2.106.0";
51384
+ return "2.106.2";
51373
51385
  }
51374
51386
  getDDICReferences() {
51375
51387
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.106.0",
3
+ "version": "2.106.2",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.106.0",
41
+ "@abaplint/core": "^2.106.2",
42
42
  "@types/chai": "^4.3.12",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",