@abaplint/core 2.118.5 → 2.118.6

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.
@@ -439,6 +439,10 @@ class TypeUtils {
439
439
  && targetKeyType !== table_type_1.TableKeyType.user) {
440
440
  return false;
441
441
  }
442
+ if (sourceKeyType === table_type_1.TableKeyType.empty && targetKeyType !== table_type_1.TableKeyType.empty
443
+ && !(target.getRowType() instanceof basic_1.AnyType)) {
444
+ return false;
445
+ }
442
446
  return this.isAssignableStrict(source.getRowType(), target.getRowType());
443
447
  }
444
448
  else if (target instanceof basic_1.UnknownType
@@ -496,13 +500,6 @@ class TypeUtils {
496
500
  return false;
497
501
  }
498
502
  }
499
- const sourceKeyType = source.getOptions().keyType;
500
- const targetKeyType = target.getOptions().keyType;
501
- if (sourceKeyType !== targetKeyType
502
- && sourceKeyType !== table_type_1.TableKeyType.user
503
- && targetKeyType !== table_type_1.TableKeyType.user) {
504
- return false;
505
- }
506
503
  return true;
507
504
  }
508
505
  return false;
@@ -111,7 +111,7 @@ class MethodParameters {
111
111
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
112
112
  return;
113
113
  }
114
- else if (item.targetType && new _type_utils_1.TypeUtils(input.scope).isAssignable(parameterType, item.targetType) === false) {
114
+ else if (item.targetType && new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(parameterType, item.targetType) === false) {
115
115
  const message = "Method parameter type not compatible, " + item.name;
116
116
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
117
117
  return;
@@ -139,7 +139,7 @@ class MethodParameters {
139
139
  }
140
140
  parameterType = parameter.getType();
141
141
  }
142
- if (item.targetType && new _type_utils_1.TypeUtils(input.scope).isAssignable(parameterType, item.targetType) === false) {
142
+ if (item.targetType && new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(parameterType, item.targetType) === false) {
143
143
  const message = "Method parameter type not compatible, " + item.name;
144
144
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
145
145
  return;
@@ -322,16 +322,17 @@ class Select {
322
322
  if (dbSources.length !== 1) {
323
323
  return basic_1.VoidType.get("SELECT_todo3");
324
324
  }
325
+ const tableOptions = { withHeader: false, keyType: basic_1.TableKeyType.empty };
325
326
  if (dbSources[0] === undefined) {
326
327
  // then its a voided table
327
- return basic_1.VoidType.get("SELECT_todo4");
328
+ return new basic_1.TableType(basic_1.VoidType.get("SELECT_todo4"), tableOptions, undefined);
328
329
  }
329
330
  const dbType = dbSources[0].parseType(scope.getRegistry());
330
331
  if (!(dbType instanceof basic_1.StructureType)) {
331
332
  return basic_1.VoidType.get("SELECT_todo5");
332
333
  }
333
334
  if (fields.length === 1 && fields[0].code === "*") {
334
- return new basic_1.TableType(dbType, { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
335
+ return new basic_1.TableType(dbType, tableOptions, undefined);
335
336
  }
336
337
  const allFieldsSimple = fields.every(f => isSimple.test(f.code));
337
338
  if (allFieldsSimple === true) {
@@ -343,7 +344,7 @@ class Select {
343
344
  }
344
345
  components.push({ name: field.code, type });
345
346
  }
346
- return new basic_1.TableType(new basic_1.StructureType(components), { withHeader: false, keyType: basic_1.TableKeyType.default }, undefined);
347
+ return new basic_1.TableType(new basic_1.StructureType(components), tableOptions, undefined);
347
348
  }
348
349
  return basic_1.VoidType.get("SELECT_todo7");
349
350
  }
@@ -11,7 +11,7 @@ const _syntax_input_1 = require("../_syntax_input");
11
11
  class Split {
12
12
  runSyntax(node, input) {
13
13
  const intoTable = node.findTokenSequencePosition("INTO", "TABLE") !== undefined;
14
- const type = intoTable ? new basic_1.TableType(basic_1.StringType.get(), { withHeader: false, keyType: basic_1.TableKeyType.user }) : basic_1.StringType.get();
14
+ const type = intoTable ? new basic_1.TableType(basic_1.StringType.get(), { withHeader: false, keyType: basic_1.TableKeyType.default }) : basic_1.StringType.get();
15
15
  for (const target of node.findAllExpressions(Expressions.Target)) {
16
16
  const inline = target.findDirectExpression(Expressions.InlineData);
17
17
  if (inline) {
@@ -74,7 +74,7 @@ class Registry {
74
74
  }
75
75
  static abaplintVersion() {
76
76
  // magic, see build script "version.sh"
77
- return "2.118.5";
77
+ return "2.118.6";
78
78
  }
79
79
  getDDICReferences() {
80
80
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.118.5",
3
+ "version": "2.118.6",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -63,7 +63,7 @@
63
63
  "typescript": "^5.9.3"
64
64
  },
65
65
  "dependencies": {
66
- "fast-xml-parser": "^5.5.8",
66
+ "fast-xml-parser": "^5.5.9",
67
67
  "json5": "^2.2.3",
68
68
  "vscode-languageserver-types": "^3.17.5"
69
69
  }