@abaplint/runtime 2.7.59 → 2.7.61

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.
@@ -38,6 +38,9 @@ function eq(left, right) {
38
38
  return right.getTrimEnd() === left.getTrimEnd();
39
39
  }
40
40
  }
41
+ else if (left instanceof types_1.Integer) {
42
+ return (parseInt(right.get(), 10) || 0) === left.get();
43
+ }
41
44
  else if (left instanceof types_1.String) {
42
45
  return right.getTrimEnd() === left.get();
43
46
  }
@@ -53,8 +56,13 @@ function eq(left, right) {
53
56
  else if (right instanceof types_1.Numc && left instanceof types_1.Numc && right.getLength() === left.getLength()) {
54
57
  return right.get() === left.get();
55
58
  }
56
- else if (right instanceof types_1.Integer && left instanceof types_1.Integer) {
57
- return right.get() === left.get();
59
+ else if (right instanceof types_1.Integer) {
60
+ if (left instanceof types_1.Integer) {
61
+ return right.get() === left.get();
62
+ }
63
+ else if (left instanceof types_1.Character) {
64
+ return (parseInt(left.get(), 10) || 0) === right.get();
65
+ }
58
66
  }
59
67
  else if (right instanceof types_1.DataReference && left instanceof types_1.DataReference) {
60
68
  return right.getPointer() === left.getPointer();
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CallFunction = void 0;
4
+ const throw_error_1 = require("../throw_error");
4
5
  const types_1 = require("../types");
5
6
  const receive_1 = require("./receive");
6
7
  class CallFunction {
@@ -17,10 +18,14 @@ class CallFunction {
17
18
  exceptions: options.exceptions,
18
19
  };
19
20
  options.name = options.name.trimEnd();
21
+ // @ts-ignore
22
+ const fm = abap.FunctionModules[options.name];
20
23
  if (options.destination) {
21
24
  if (options.destination.trim() === "") {
22
- // @ts-ignore
23
- await abap.FunctionModules[options.name](param);
25
+ if (fm === undefined) {
26
+ (0, throw_error_1.throwError)("CX_SY_DYN_CALL_ILLEGAL_FUNC");
27
+ }
28
+ await fm(param);
24
29
  return;
25
30
  }
26
31
  const dest = this.context.RFCDestinations[options.destination];
@@ -36,8 +41,10 @@ class CallFunction {
36
41
  });
37
42
  }
38
43
  else if (options.calling) {
39
- // @ts-ignore
40
- await abap.FunctionModules[options.name](param);
44
+ if (fm === undefined) {
45
+ (0, throw_error_1.throwError)("CX_SY_DYN_CALL_ILLEGAL_FUNC");
46
+ }
47
+ await fm(param);
41
48
  // save importing + tables + changing + exception for RECEIVE RESULTS
42
49
  (0, receive_1._receiveSetResult)(param);
43
50
  // call the callback, async
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.7.59",
3
+ "version": "2.7.61",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",