@abaplint/core 2.93.66 → 2.93.68

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.
@@ -68,7 +68,7 @@ class Procedural {
68
68
  return undefined;
69
69
  }
70
70
  findFunctionScope(obj, node, filename) {
71
- var _a, _b;
71
+ var _a, _b, _c, _d, _e;
72
72
  if (!(obj instanceof objects_1.FunctionGroup)) {
73
73
  throw new Error("findFunctionScope, expected function group input");
74
74
  }
@@ -105,8 +105,17 @@ class Procedural {
105
105
  found = c;
106
106
  }
107
107
  }
108
+ if (found === undefined || found instanceof basic_1.UnknownType || found instanceof basic_1.VoidType) {
109
+ const f = (_b = this.scope.findType(name)) === null || _b === void 0 ? void 0 : _b.getType();
110
+ if (f && f instanceof basic_1.StructureType) {
111
+ const c = f.getComponentByName(field);
112
+ if (c) {
113
+ found = c;
114
+ }
115
+ }
116
+ }
108
117
  }
109
- else if ((found instanceof basic_1.UnknownType || found instanceof basic_1.VoidType) && ((_b = param.type) === null || _b === void 0 ? void 0 : _b.includes("=>"))) {
118
+ else if ((found instanceof basic_1.UnknownType || found instanceof basic_1.VoidType) && ((_c = param.type) === null || _c === void 0 ? void 0 : _c.includes("=>"))) {
110
119
  const [name, field] = param.type.split("=>");
111
120
  const def = this.scope.findObjectDefinition(name);
112
121
  const c = new _object_oriented_1.ObjectOriented(this.scope).searchTypeName(def, field);
@@ -119,6 +128,18 @@ class Procedural {
119
128
  if (f) {
120
129
  found = f;
121
130
  }
131
+ if (found === undefined || found instanceof basic_1.UnknownType || found instanceof basic_1.VoidType) {
132
+ const f = (_d = this.scope.findType(param.type)) === null || _d === void 0 ? void 0 : _d.getType();
133
+ if (f) {
134
+ found = f;
135
+ }
136
+ }
137
+ if (found === undefined || found instanceof basic_1.UnknownType || found instanceof basic_1.VoidType) {
138
+ const f = (_e = this.scope.findTypePoolType(param.type)) === null || _e === void 0 ? void 0 : _e.getType();
139
+ if (f) {
140
+ found = f;
141
+ }
142
+ }
122
143
  }
123
144
  if (found instanceof basic_1.UnknownType && new ddic_1.DDIC(this.reg).inErrorNamespace(param.type) === false) {
124
145
  found = new basic_1.VoidType(param.type);
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.93.66";
66
+ return "2.93.68";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
@@ -556,6 +556,7 @@ ${indentation}`);
556
556
  return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), "Outline SELECT @DATA", this.getMetadata().key, this.conf.severity, fix);
557
557
  }
558
558
  downportMessage(high, lowFile, highSyntax) {
559
+ var _a, _b;
559
560
  if (!(high.get() instanceof Statements.Message)) {
560
561
  return undefined;
561
562
  }
@@ -568,6 +569,12 @@ ${indentation}`);
568
569
  if (s === likeSource) {
569
570
  continue;
570
571
  }
572
+ else if (s.getChildren().length === 1 && ((_a = s.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Constant) {
573
+ continue;
574
+ }
575
+ else if (s.getChildren().length === 1 && ((_b = s.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain) {
576
+ continue;
577
+ }
571
578
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
572
579
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
573
580
  const firstToken = high.getFirstToken();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.93.66",
3
+ "version": "2.93.68",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",