@abaplint/core 2.105.11 → 2.105.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.
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EndTestSeam = void 0;
4
4
  const combi_1 = require("../combi");
5
+ const version_1 = require("../../../version");
5
6
  class EndTestSeam {
6
7
  getMatcher() {
7
- return (0, combi_1.str)("END-TEST-SEAM");
8
+ return (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.str)("END-TEST-SEAM"));
8
9
  }
9
10
  }
10
11
  exports.EndTestSeam = EndTestSeam;
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TestSeam = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  const expressions_1 = require("../expressions");
6
+ const version_1 = require("../../../version");
6
7
  class TestSeam {
7
8
  getMatcher() {
8
- return (0, combi_1.seq)("TEST-SEAM", expressions_1.TestSeamName);
9
+ return (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)("TEST-SEAM", expressions_1.TestSeamName));
9
10
  }
10
11
  }
11
12
  exports.TestSeam = TestSeam;
@@ -10,9 +10,12 @@ class InlineData {
10
10
  var _a;
11
11
  const token = (_a = node.findFirstExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
12
12
  if (token && type) {
13
- if (type instanceof basic_1.CSequenceType) {
13
+ if (type instanceof basic_1.CSequenceType || type instanceof basic_1.CLikeType) {
14
14
  type = basic_1.StringType.get();
15
15
  }
16
+ else if (type instanceof basic_1.CGenericType) {
17
+ throw new Error("InlineData, generic type C cannot be used for inferred type");
18
+ }
16
19
  const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
17
20
  scope.addIdentifier(identifier);
18
21
  scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
@@ -170,6 +170,9 @@ class Source {
170
170
  while (children.length >= 0) {
171
171
  if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.MethodCallChain) {
172
172
  context = new method_call_chain_1.MethodCallChain().runSyntax(first, scope, filename, targetType);
173
+ if (context === undefined) {
174
+ throw new Error("Method has no RETURNING value");
175
+ }
173
176
  }
174
177
  else if (first instanceof nodes_1.ExpressionNode && first.get() instanceof Expressions.FieldChain) {
175
178
  context = new field_chain_1.FieldChain().runSyntax(first, scope, filename, type);
@@ -23,6 +23,19 @@ class SQLCompare {
23
23
  }
24
24
  sourceType = new sql_source_1.SQLSource().runSyntax(s, scope, filename);
25
25
  }
26
+ const sqlin = node.findDirectExpression(Expressions.SQLIn);
27
+ if (sqlin && sqlin.getChildren().length === 2) {
28
+ const insource = node.findFirstExpression(Expressions.SQLSource);
29
+ if (insource) {
30
+ const intype = new sql_source_1.SQLSource().runSyntax(insource, scope, filename);
31
+ if (intype &&
32
+ !(intype instanceof basic_1.VoidType) &&
33
+ !(intype instanceof basic_1.UnknownType) &&
34
+ !(intype instanceof basic_1.TableType)) {
35
+ throw new Error("IN, not a table");
36
+ }
37
+ }
38
+ }
26
39
  const fieldName = (_a = node.findDirectExpression(Expressions.SQLFieldName)) === null || _a === void 0 ? void 0 : _a.concatTokens();
27
40
  if (fieldName && sourceType && token) {
28
41
  // check compatibility for rule sql_value_conversion
@@ -65,7 +65,7 @@ class Registry {
65
65
  }
66
66
  static abaplintVersion() {
67
67
  // magic, see build script "version.sh"
68
- return "2.105.11";
68
+ return "2.105.13";
69
69
  }
70
70
  getDDICReferences() {
71
71
  return this.ddicReferences;
@@ -1526,6 +1526,10 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
1526
1526
  if (valueBody === undefined) {
1527
1527
  return;
1528
1528
  }
1529
+ const type = source.findDirectExpression(Expressions.TypeNameOrInfer);
1530
+ if (type === undefined || (type === null || type === void 0 ? void 0 : type.concatTokens()) !== "#") {
1531
+ return;
1532
+ }
1529
1533
  const fieldAssignments = valueBody.findDirectExpressions(Expressions.FieldAssignment);
1530
1534
  if (fieldAssignments.length === 0) {
1531
1535
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.105.11",
3
+ "version": "2.105.13",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,10 +50,10 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.39.1",
53
+ "@microsoft/api-extractor": "^7.39.4",
54
54
  "@types/chai": "^4.3.11",
55
55
  "@types/mocha": "^10.0.6",
56
- "@types/node": "^20.11.5",
56
+ "@types/node": "^20.11.6",
57
57
  "chai": "^4.4.1",
58
58
  "eslint": "^8.56.0",
59
59
  "mocha": "^10.2.0",