@abaplint/cli 2.119.66 → 2.119.67

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 +15 -1
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -32150,6 +32150,7 @@ const source_1 = __webpack_require__(/*! ./source */ "../core/build/src/abap/5_s
32150
32150
  const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "../core/build/src/abap/5_syntax/_type_utils.js");
32151
32151
  const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "../core/build/src/abap/5_syntax/_syntax_input.js");
32152
32152
  const constant_1 = __webpack_require__(/*! ./constant */ "../core/build/src/abap/5_syntax/expressions/constant.js");
32153
+ const _builtin_1 = __webpack_require__(/*! ../_builtin */ "../core/build/src/abap/5_syntax/_builtin.js");
32153
32154
  class MethodCallParam {
32154
32155
  static runSyntax(node, input, method) {
32155
32156
  if (!(node.get() instanceof Expressions.MethodCallParam)) {
@@ -32210,6 +32211,19 @@ class MethodCallParam {
32210
32211
  let sourceType = undefined;
32211
32212
  if (child.get() instanceof Expressions.Source) {
32212
32213
  sourceType = source_1.Source.runSyntax(child, input, targetType);
32214
+ const chain = child.findDirectExpression(Expressions.FieldChain);
32215
+ const isCalculated = child.findDirectExpression(Expressions.Source) !== undefined;
32216
+ const hasOffsetOrLength = chain !== undefined
32217
+ && isCalculated === false
32218
+ && (chain.findDirectExpression(Expressions.FieldOffset) !== undefined
32219
+ || chain.findDirectExpression(Expressions.FieldLength) !== undefined);
32220
+ if (hasOffsetOrLength
32221
+ && !(method instanceof _builtin_1.BuiltInMethod)
32222
+ && (sourceType instanceof basic_1.StringType || sourceType instanceof basic_1.XStringType)) {
32223
+ const message = `Offsets or lengths cannot be specified for fields of type "STRING" or "XSTRING" in the current statement`;
32224
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, child.getFirstToken(), message));
32225
+ return;
32226
+ }
32213
32227
  }
32214
32228
  else if (child.get() instanceof Expressions.ConstantString) {
32215
32229
  sourceType = constant_1.Constant.runSyntax(child);
@@ -68833,7 +68847,7 @@ class Registry {
68833
68847
  }
68834
68848
  static abaplintVersion() {
68835
68849
  // magic, see build script "version.js"
68836
- return "2.119.66";
68850
+ return "2.119.67";
68837
68851
  }
68838
68852
  getDDICReferences() {
68839
68853
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.119.66",
3
+ "version": "2.119.67",
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.119.66",
42
+ "@abaplint/core": "^2.119.67",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",