@abaplint/transpiler 2.3.111 → 2.3.113

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.
@@ -180,6 +180,7 @@ class Traversal {
180
180
  }
181
181
  findMethodReference(token, scope) {
182
182
  var _a, _b;
183
+ let candidate = undefined;
183
184
  if (scope === undefined) {
184
185
  return undefined;
185
186
  }
@@ -191,7 +192,13 @@ class Traversal {
191
192
  if (((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooName) && ((_b = r.extra) === null || _b === void 0 ? void 0 : _b.ooType) === "INTF") {
192
193
  name = r.extra.ooName + "$" + name;
193
194
  }
194
- return { def: r.resolved, name };
195
+ candidate = { def: r.resolved, name };
196
+ if (token.getStart() instanceof abaplint.VirtualPosition
197
+ && name.toLowerCase().includes(token.getStr().toLowerCase()) === false) {
198
+ // if its macros and they are nested everything can go wrong, so try looking for a better candidate
199
+ continue;
200
+ }
201
+ return candidate;
195
202
  }
196
203
  else if (r.referenceType === abaplint.ReferenceType.BuiltinMethodReference
197
204
  && r.position.getStart().equals(token.getStart())) {
@@ -200,7 +207,7 @@ class Traversal {
200
207
  return { def, name };
201
208
  }
202
209
  }
203
- return undefined;
210
+ return candidate;
204
211
  }
205
212
  isBuiltinVariable(token) {
206
213
  const scope = this.findCurrentScopeByToken(token);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.3.111",
3
+ "version": "2.3.113",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "author": "abaplint",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@abaplint/core": "^2.94.25",
31
+ "@abaplint/core": "^2.95.3",
32
32
  "source-map": "^0.7.4"
33
33
  },
34
34
  "devDependencies": {