@abaplint/core 2.113.232 → 2.113.233

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.
@@ -503,9 +503,30 @@ class TypeUtils {
503
503
  return true;
504
504
  }
505
505
  else if (source instanceof basic_1.StructureType) {
506
- if (this.structureContainsString(target) && !this.structureContainsString(source)) {
506
+ const targetDeep = this.structureContainsString(target);
507
+ const sourceDeep = this.structureContainsString(source);
508
+ if (targetDeep && !sourceDeep) {
507
509
  return false;
508
510
  }
511
+ const targetComponents = target.getComponents();
512
+ const sourceComponents = source.getComponents();
513
+ if (targetComponents.length !== sourceComponents.length) {
514
+ if (targetDeep === true || sourceDeep === true) {
515
+ return false;
516
+ }
517
+ }
518
+ for (let i = 0; i < targetComponents.length; i++) {
519
+ if (sourceComponents[i] === undefined) {
520
+ continue;
521
+ }
522
+ // hmm
523
+ if (sourceComponents[i].type instanceof basic_1.StringType && !(targetComponents[i].type instanceof basic_1.StringType)) {
524
+ return false;
525
+ }
526
+ else if (!(sourceComponents[i].type instanceof basic_1.StringType) && targetComponents[i].type instanceof basic_1.StringType) {
527
+ return false;
528
+ }
529
+ }
509
530
  return true;
510
531
  }
511
532
  else if (target.containsVoid() === true) {
@@ -26,7 +26,7 @@ class FieldAssignment {
26
26
  const text = c.concatTokens();
27
27
  if (text !== "-" && context instanceof basic_1.StructureType) {
28
28
  context = context.getComponentByName(text);
29
- if (context === undefined && targetType.containsVoid() === false) {
29
+ if (context === undefined) {
30
30
  const message = `field ${text} does not exist in structure`;
31
31
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
32
32
  return;
@@ -6,6 +6,7 @@ const _object_oriented_1 = require("../_object_oriented");
6
6
  const _scope_type_1 = require("../_scope_type");
7
7
  const _reference_1 = require("../_reference");
8
8
  const _syntax_input_1 = require("../_syntax_input");
9
+ const visibility_1 = require("../../4_file_information/visibility");
9
10
  class MethodImplementation {
10
11
  runSyntax(node, input) {
11
12
  const helper = new _object_oriented_1.ObjectOriented(input.scope);
@@ -19,6 +20,13 @@ class MethodImplementation {
19
20
  return;
20
21
  }
21
22
  const { method: methodDefinition } = helper.searchMethodName(classDefinition, methodName);
23
+ if (classDefinition.isForTesting()
24
+ && (methodDefinition === null || methodDefinition === void 0 ? void 0 : methodDefinition.getVisibility()) !== visibility_1.Visibility.Private
25
+ && ["SETUP", "TEARDOWN", "CLASS_SETUP", "CLASS_TEARDOWN"].includes(methodName.toUpperCase())) {
26
+ const message = "Special test method \"" + methodName + "\" must be private";
27
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
28
+ return;
29
+ }
22
30
  const start = node.getFirstToken().getStart();
23
31
  if ((methodDefinition === null || methodDefinition === void 0 ? void 0 : methodDefinition.isStatic()) === false) {
24
32
  input.scope.push(_scope_type_1.ScopeType.MethodInstance, methodName, start, input.filename);
@@ -42,6 +42,11 @@ class ReadTable {
42
42
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
43
43
  return;
44
44
  }
45
+ else if (sourceType instanceof basic_1.TableType && sourceType.getAccessType() === basic_1.TableAccessType.hashed) {
46
+ const message = "INDEX on hashed table not possible";
47
+ input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
48
+ return;
49
+ }
45
50
  }
46
51
  const fromSource = node.findExpressionAfterToken("FROM");
47
52
  if (fromSource) {
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.232";
70
+ return "2.113.233";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.232",
3
+ "version": "2.113.233",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -53,9 +53,9 @@
53
53
  "@microsoft/api-extractor": "^7.53.1",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^24.7.2",
56
+ "@types/node": "^24.9.1",
57
57
  "chai": "^4.5.0",
58
- "eslint": "^9.37.0",
58
+ "eslint": "^9.38.0",
59
59
  "mocha": "^11.7.4",
60
60
  "c8": "^10.1.3",
61
61
  "source-map-support": "^0.5.21",