@abaplint/core 2.105.6 → 2.105.8

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.
@@ -21,6 +21,9 @@ class TypeUtils {
21
21
  }
22
22
  return true;
23
23
  }
24
+ else if (type instanceof basic_1.TableType && type.isWithHeader()) {
25
+ return this.isCharLikeStrict(type.getRowType());
26
+ }
24
27
  else if (type instanceof basic_1.StringType
25
28
  || type instanceof basic_1.AnyType
26
29
  || type instanceof basic_1.CharacterType
@@ -90,6 +93,9 @@ class TypeUtils {
90
93
  }
91
94
  return true;
92
95
  }
96
+ else if (type instanceof basic_1.TableType && type.isWithHeader()) {
97
+ return this.isHexLike(type.getRowType());
98
+ }
93
99
  else if (type instanceof basic_1.XStringType
94
100
  || type instanceof basic_1.HexType
95
101
  || type instanceof basic_1.VoidType
@@ -23,7 +23,7 @@ class Concatenate {
23
23
  }
24
24
  else if (target) {
25
25
  const type = new target_1.Target().runSyntax(target, scope, filename);
26
- const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLike(type);
26
+ const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLikeStrict(type);
27
27
  if (compatible === false) {
28
28
  throw new Error("Target type not compatible");
29
29
  }
@@ -37,7 +37,7 @@ class Concatenate {
37
37
  linesMode = false;
38
38
  continue;
39
39
  }
40
- const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLike(type);
40
+ const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLikeStrict(type);
41
41
  if (compatible === false) {
42
42
  throw new Error("Source type not compatible");
43
43
  }
@@ -99,11 +99,14 @@ class CreateObject {
99
99
  }
100
100
  const source = p.findDirectExpression(Expressions.Source);
101
101
  const sourceType = new source_1.Source().runSyntax(source, scope, filename);
102
+ const calculated = (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.MethodCallChain)) !== undefined
103
+ || (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.StringTemplate)) !== undefined
104
+ || (source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.ArithOperator)) !== undefined;
102
105
  const found = allImporting === null || allImporting === void 0 ? void 0 : allImporting.find(p => p.getName().toUpperCase() === name);
103
106
  if (found === undefined) {
104
107
  throw new Error(`constructor parameter "${name}" does not exist`);
105
108
  }
106
- else if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, found.getType()) === false) {
109
+ else if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, found.getType(), calculated) === false) {
107
110
  throw new Error(`constructor parameter "${name}" type not compatible`);
108
111
  }
109
112
  requiredImporting.delete(name);
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.105.6";
68
+ return "2.105.8";
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.105.6",
3
+ "version": "2.105.8",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,14 +50,14 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.39.0",
53
+ "@microsoft/api-extractor": "^7.39.1",
54
54
  "@types/chai": "^4.3.11",
55
55
  "@types/mocha": "^10.0.6",
56
- "@types/node": "^20.10.5",
56
+ "@types/node": "^20.10.6",
57
57
  "chai": "^4.3.10",
58
58
  "eslint": "^8.56.0",
59
59
  "mocha": "^10.2.0",
60
- "c8": "^8.0.1",
60
+ "c8": "^9.0.0",
61
61
  "source-map-support": "^0.5.21",
62
62
  "ts-json-schema-generator": "^1.5.0",
63
63
  "typescript": "^5.3.3"