@abaplint/cli 2.120.11 → 2.120.12

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 +26 -4
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -27356,6 +27356,16 @@ class TypeUtils {
27356
27356
  }
27357
27357
  return false;
27358
27358
  }
27359
+ isCharLikeField(type) {
27360
+ return type instanceof basic_1.CharacterType
27361
+ || type instanceof basic_1.NumericType
27362
+ || type instanceof basic_1.DateType
27363
+ || type instanceof basic_1.TimeType
27364
+ || type instanceof basic_1.CLikeType
27365
+ || type instanceof basic_1.AnyType
27366
+ || type instanceof basic_1.UnknownType
27367
+ || type instanceof basic_1.VoidType;
27368
+ }
27359
27369
  isCharLike(type) {
27360
27370
  if (type === undefined) {
27361
27371
  return false;
@@ -35804,7 +35814,11 @@ class ValueBody {
35804
35814
  field_assignment_1.FieldAssignment.runSyntax(s, input, rowType);
35805
35815
  }
35806
35816
  for (const s of foo.findDirectExpressions(Expressions.Source)) {
35807
- source_1.Source.runSyntax(s, input, rowType);
35817
+ const sourceType = source_1.Source.runSyntax(s, input, rowType);
35818
+ if (rowType instanceof basic_1.StringType && sourceType instanceof basic_1.CharacterType) {
35819
+ const message = "VALUE, source type CharacterType not compatible with StringType";
35820
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, s.getFirstToken(), message));
35821
+ }
35808
35822
  }
35809
35823
  }
35810
35824
  if (letScoped === true) {
@@ -46636,7 +46650,11 @@ class Write {
46636
46650
  }
46637
46651
  const target = node.findDirectExpression(Expressions.Target);
46638
46652
  if (target) {
46639
- target_1.Target.runSyntax(target, input);
46653
+ const targetType = target_1.Target.runSyntax(target, input);
46654
+ if (new _type_utils_1.TypeUtils(input.scope).isCharLikeField(targetType) === false) {
46655
+ const message = `"${target.getFirstToken().getStr()}" must be a character-like field (data type C, N, D, or T)`;
46656
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, target.getFirstToken(), message));
46657
+ }
46640
46658
  }
46641
46659
  }
46642
46660
  }
@@ -69413,7 +69431,7 @@ class Registry {
69413
69431
  }
69414
69432
  static abaplintVersion() {
69415
69433
  // magic, see build script "version.js"
69416
- return "2.120.11";
69434
+ return "2.120.12";
69417
69435
  }
69418
69436
  getDDICReferences() {
69419
69437
  return this.ddicReferences;
@@ -87804,7 +87822,11 @@ class NoMandtInDatabaseOperations extends _abap_rule_1.ABAPRule {
87804
87822
  }
87805
87823
  findMandtInCondition(statement) {
87806
87824
  for (const condition of statement.findAllExpressions(Expressions.SQLCond)) {
87807
- for (const field of condition.findAllExpressions(Expressions.SQLFieldName)) {
87825
+ const fields = condition.findAllExpressionsMulti([
87826
+ Expressions.SQLFieldName,
87827
+ Expressions.SQLAliasField,
87828
+ ]);
87829
+ for (const field of fields) {
87808
87830
  const name = field.concatTokens().toUpperCase();
87809
87831
  if (name === "MANDT" || name.endsWith("~MANDT")) {
87810
87832
  return field;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.120.11",
3
+ "version": "2.120.12",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.120.11",
42
+ "@abaplint/core": "^2.120.12",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",