@abaplint/cli 2.102.24 → 2.102.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.
Files changed (2) hide show
  1. package/build/cli.js +16 -7
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -20707,7 +20707,7 @@ class CurrentScope {
20707
20707
  return undefined;
20708
20708
  }
20709
20709
  const typePoolName = name.split("_")[0];
20710
- if (typePoolName.length <= 2 || typePoolName.length > 5) {
20710
+ if (typePoolName.length <= 1 || typePoolName.length > 5) {
20711
20711
  return undefined;
20712
20712
  }
20713
20713
  const typePool = this.reg.getObject("TYPE", typePoolName);
@@ -24169,6 +24169,9 @@ class InlineData {
24169
24169
  var _a;
24170
24170
  const token = (_a = node.findFirstExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
24171
24171
  if (token && type) {
24172
+ if (type instanceof basic_1.CSequenceType) {
24173
+ type = basic_1.StringType.get();
24174
+ }
24172
24175
  const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
24173
24176
  scope.addIdentifier(identifier);
24174
24177
  scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
@@ -28282,7 +28285,7 @@ class Data {
28282
28285
  const id = new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);
28283
28286
  if ((id === null || id === void 0 ? void 0 : id.getType().isGeneric()) === true
28284
28287
  && (id === null || id === void 0 ? void 0 : id.getType().containsVoid()) === false) {
28285
- throw new Error("DATA definition cannot be generic, " + name);
28288
+ throw new Error("DATA definition cannot be generic, " + (name === null || name === void 0 ? void 0 : name.concatTokens()));
28286
28289
  }
28287
28290
  return id;
28288
28291
  }
@@ -48732,7 +48735,7 @@ class Registry {
48732
48735
  }
48733
48736
  static abaplintVersion() {
48734
48737
  // magic, see build script "version.sh"
48735
- return "2.102.24";
48738
+ return "2.102.26";
48736
48739
  }
48737
48740
  getDDICReferences() {
48738
48741
  return this.ddicReferences;
@@ -53631,7 +53634,7 @@ Make sure to test the downported code, it might not always be completely correct
53631
53634
  }
53632
53635
  }
53633
53636
  }
53634
- if (ret.length === 0 && lowFile.getRaw().includes(" xsdbool( ")) {
53637
+ if (ret.length === 0 && lowFile.getRaw().includes(" xsdbool(")) {
53635
53638
  for (let i = 0; i < lowStatements.length; i++) {
53636
53639
  const high = highStatements[i];
53637
53640
  const issue = this.replaceXsdBool(high, lowFile, highSyntax);
@@ -53815,7 +53818,7 @@ Make sure to test the downported code, it might not always be completely correct
53815
53818
  if (found) {
53816
53819
  return found;
53817
53820
  }
53818
- found = this.outlineDataSimple(high, lowFile);
53821
+ found = this.outlineDataSimple(high, lowFile, highSyntax);
53819
53822
  if (found) {
53820
53823
  return found;
53821
53824
  }
@@ -54359,8 +54362,7 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
54359
54362
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
54360
54363
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
54361
54364
  }
54362
- outlineDataSimple(node, lowFile) {
54363
- // outlines "DATA(ls_msg) = temp1.", note that this does not need to look at types
54365
+ outlineDataSimple(node, lowFile, highSyntax) {
54364
54366
  var _a, _b, _c;
54365
54367
  if (!(node.get() instanceof Statements.Move)) {
54366
54368
  return undefined;
@@ -54399,6 +54401,13 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
54399
54401
  }
54400
54402
  }
54401
54403
  else {
54404
+ const spag = highSyntax.spaghetti.lookupPosition(source.getFirstToken().getStart(), lowFile.getFilename());
54405
+ if (spag) {
54406
+ const found = spag.findVariable(source.concatTokens());
54407
+ if (found && found.getType().isGeneric() === true) {
54408
+ return undefined;
54409
+ }
54410
+ }
54402
54411
  type = source.concatTokens();
54403
54412
  }
54404
54413
  const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.102.24",
3
+ "version": "2.102.26",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,12 +38,12 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.102.24",
41
+ "@abaplint/core": "^2.102.26",
42
42
  "@types/chai": "^4.3.5",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.2",
45
45
  "@types/mocha": "^10.0.1",
46
- "@types/node": "^20.5.0",
46
+ "@types/node": "^20.5.2",
47
47
  "@types/progress": "^2.0.5",
48
48
  "chai": "^4.3.7",
49
49
  "chalk": "^5.3.0",