@abaplint/runtime 2.0.12 → 2.0.13

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.
@@ -5,28 +5,28 @@ const compare_1 = require("../compare");
5
5
  // todo, field symbols as input?
6
6
  // todo, local classes?
7
7
  async function cast(target, source) {
8
- var _a;
9
8
  if ((0, compare_1.initial)(source)) {
10
9
  target.clear();
11
10
  return;
12
11
  }
13
- const targetName = (_a = target.getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toUpperCase();
14
- if ((targetName === null || targetName === void 0 ? void 0 : targetName.startsWith("IF_")) === false
15
- && (targetName === null || targetName === void 0 ? void 0 : targetName.startsWith("ZIF_")) === false) { // todo, interfaces are also classes but not inherited
16
- // using "instanceof" is probably wrong in some cases,
17
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof
12
+ /*
13
+ const targetName = target.getQualifiedName()?.toUpperCase();
14
+ if (targetName?.startsWith("IF_") === false
15
+ && targetName?.startsWith("ZIF_") === false) { // todo, interfaces are also classes but not inherited
16
+ // using "instanceof" is probably wrong in some cases,
17
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof
18
+ // @ts-ignore
19
+ if (abap.Classes[targetName] && source instanceof abap.Classes[targetName] === false) {
18
20
  // @ts-ignore
19
- if (abap.Classes[targetName] && source instanceof abap.Classes[targetName] === false) {
20
- // @ts-ignore
21
- if (abap.Classes["CX_SY_MOVE_CAST_ERROR"] !== undefined) {
22
- // @ts-ignore
23
- throw new abap.Classes["CX_SY_MOVE_CAST_ERROR"]();
24
- }
25
- else {
26
- throw "Global class CX_SY_MOVE_CAST_ERROR not found";
27
- }
21
+ if (abap.Classes["CX_SY_MOVE_CAST_ERROR"] !== undefined) {
22
+ // @ts-ignore
23
+ throw new abap.Classes["CX_SY_MOVE_CAST_ERROR"]();
24
+ } else {
25
+ throw "Global class CX_SY_MOVE_CAST_ERROR not found";
28
26
  }
27
+ }
29
28
  }
29
+ */
30
30
  // throw cx_sy_move_cast_error if incompatible
31
31
  // check with javascript instanceof?
32
32
  // handling interfaces?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",