@abaplint/core 2.102.31 → 2.102.33

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.
@@ -211,7 +211,7 @@ class TypeUtils {
211
211
  return false;
212
212
  }
213
213
  isAssignableStrict(source, target, calculated = false) {
214
- var _a, _b, _c, _d, _e, _f, _g;
214
+ var _a, _b, _c, _d, _e, _f, _g, _h;
215
215
  /*
216
216
  console.dir(source);
217
217
  console.dir(target);
@@ -300,7 +300,13 @@ class TypeUtils {
300
300
  }
301
301
  }
302
302
  else if (source instanceof basic_1.IntegerType) {
303
- if (target instanceof basic_1.StringType || target instanceof basic_1.Integer8Type) {
303
+ if (target instanceof basic_1.StringType) {
304
+ return false;
305
+ }
306
+ else if (target instanceof basic_1.Integer8Type) {
307
+ if (((_h = source.getAbstractTypeData()) === null || _h === void 0 ? void 0 : _h.derivedFromConstant) === true) {
308
+ return true;
309
+ }
304
310
  return false;
305
311
  }
306
312
  }
@@ -7,7 +7,7 @@ class Constant {
7
7
  runSyntax(node) {
8
8
  // todo: ConcatenatedConstant is not used?
9
9
  if (node.findDirectExpression(expressions_1.Integer)) {
10
- return basic_1.IntegerType.get();
10
+ return basic_1.IntegerType.get({ derivedFromConstant: true });
11
11
  }
12
12
  else if (node.getFirstToken().getStr().startsWith("'")) {
13
13
  let len = node.getFirstToken().getStr().length - 2;
@@ -16,7 +16,8 @@ class InsertInternal {
16
16
  if (t) {
17
17
  targetType = new target_1.Target().runSyntax(t, scope, filename);
18
18
  }
19
- if (targetType instanceof basic_1.TableType && node.findDirectTokenByText("LINES") === undefined) {
19
+ if (targetType instanceof basic_1.TableType
20
+ && node.findDirectTokenByText("LINES") === undefined) {
20
21
  targetType = targetType.getRowType();
21
22
  }
22
23
  let source = node.findDirectExpression(Expressions.SimpleSource4);
@@ -34,7 +35,8 @@ class InsertInternal {
34
35
  new fstarget_1.FSTarget().runSyntax(afterAssigning, scope, filename, sourceType);
35
36
  }
36
37
  }
37
- if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType) === false) {
38
+ if (afterAssigning === undefined
39
+ && new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType) === false) {
38
40
  throw new Error("Types not compatible");
39
41
  }
40
42
  const afterInto = node.findExpressionAfterToken("INTO");
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.102.31";
68
+ return "2.102.33";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.102.31",
3
+ "version": "2.102.33",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",