@abaplint/cli 2.101.18 → 2.101.19

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 +11 -6
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -21632,13 +21632,13 @@ class TypeUtils {
21632
21632
  }
21633
21633
  return false;
21634
21634
  }
21635
- isAssignableStrict(source, target, containsMethodCall = false) {
21636
- var _a, _b, _c, _d, _e, _f;
21635
+ isAssignableStrict(source, target, calculated = false) {
21636
+ var _a, _b, _c, _d, _e, _f, _g;
21637
21637
  /*
21638
21638
  console.dir(source);
21639
21639
  console.dir(target);
21640
21640
  */
21641
- if (containsMethodCall) {
21641
+ if (calculated) {
21642
21642
  return this.isAssignable(source, target);
21643
21643
  }
21644
21644
  if (source instanceof basic_1.CharacterType) {
@@ -21680,10 +21680,13 @@ class TypeUtils {
21680
21680
  return false;
21681
21681
  }
21682
21682
  else if (target instanceof basic_1.IntegerType) {
21683
+ if (((_f = source.getAbstractTypeData()) === null || _f === void 0 ? void 0 : _f.derivedFromConstant) === true) {
21684
+ return true;
21685
+ }
21683
21686
  return false;
21684
21687
  }
21685
21688
  else if (target instanceof basic_1.XSequenceType || target instanceof basic_1.XStringType) {
21686
- if (((_f = source.getAbstractTypeData()) === null || _f === void 0 ? void 0 : _f.derivedFromConstant) === true) {
21689
+ if (((_g = source.getAbstractTypeData()) === null || _g === void 0 ? void 0 : _g.derivedFromConstant) === true) {
21687
21690
  return true;
21688
21691
  }
21689
21692
  return false;
@@ -24622,10 +24625,12 @@ class MethodCallParam {
24622
24625
  if (child.get() instanceof Expressions.Source) {
24623
24626
  sourceType = new source_1.Source().runSyntax(child, scope, filename, targetType);
24624
24627
  }
24628
+ const calculated = child.findFirstExpression(Expressions.MethodCallChain) !== undefined
24629
+ || child.findFirstExpression(Expressions.ArithOperator) !== undefined;
24625
24630
  if (sourceType === undefined) {
24626
24631
  throw new Error("No source type determined, method source");
24627
24632
  }
24628
- else if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType, child.findFirstExpression(Expressions.MethodCallChain) !== undefined) === false) {
24633
+ else if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType, calculated) === false) {
24629
24634
  throw new Error("Method parameter type not compatible");
24630
24635
  }
24631
24636
  }
@@ -48448,7 +48453,7 @@ class Registry {
48448
48453
  }
48449
48454
  static abaplintVersion() {
48450
48455
  // magic, see build script "version.sh"
48451
- return "2.101.18";
48456
+ return "2.101.19";
48452
48457
  }
48453
48458
  getDDICReferences() {
48454
48459
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.101.18",
3
+ "version": "2.101.19",
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.101.18",
41
+ "@abaplint/core": "^2.101.19",
42
42
  "@types/chai": "^4.3.5",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.2",