@abaplint/core 2.113.163 → 2.113.165

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.
@@ -3881,6 +3881,7 @@ declare interface IReference {
3881
3881
  declare interface IReferenceExtras {
3882
3882
  ooName?: string;
3883
3883
  ooType?: "CLAS" | "INTF" | "Void";
3884
+ foundQualified?: boolean;
3884
3885
  }
3885
3886
 
3886
3887
  export declare interface IRegistry {
@@ -304,27 +304,24 @@ class Source {
304
304
  console.dir(inferredType);
305
305
  console.dir(typeToken);
306
306
  */
307
- // hmm, need to align all this
308
307
  if (typeName === "#" && inferredType && typeToken) {
309
308
  const found = basic.lookupQualifiedName(inferredType.getQualifiedName());
310
309
  if (found) {
311
- input.scope.addReference(typeToken, found, _reference_1.ReferenceType.InferredType, input.filename);
312
- }
313
- else if (inferredType instanceof basic_1.DataReference) {
314
- const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, inferredType);
315
- input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename);
310
+ input.scope.addReference(typeToken, found, _reference_1.ReferenceType.InferredType, input.filename, { foundQualified: true });
316
311
  }
317
312
  else if (inferredType instanceof basic_1.ObjectReferenceType) {
318
313
  const def = input.scope.findObjectDefinition(inferredType.getQualifiedName());
314
+ const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, inferredType);
319
315
  if (def) {
320
- const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, inferredType);
321
- input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename);
316
+ input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename, { foundQualified: true });
317
+ }
318
+ else {
319
+ input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename, { foundQualified: false });
322
320
  }
323
321
  }
324
- else if (inferredType instanceof basic_1.CharacterType) {
325
- // character is bit special it does not have a qualified name eg "TYPE c LENGTH 6"
322
+ else {
326
323
  const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, inferredType);
327
- input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename);
324
+ input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename, { foundQualified: false });
328
325
  }
329
326
  }
330
327
  }
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.163";
70
+ return "2.113.165";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -846,7 +846,7 @@ ${indentation}`);
846
846
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
847
847
  return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), "Outline SELECT @DATA", this.getMetadata().key, this.conf.severity, fix);
848
848
  }
849
- // the anonymous type minght be used in inferred type statements, define it so it can be referred
849
+ // the anonymous type might be used in inferred type statements, define it so it can be referred
850
850
  anonymousTableType(high, lowFile, highSyntax) {
851
851
  if (!(high.get() instanceof Statements.Data)) {
852
852
  return undefined;
@@ -1833,6 +1833,9 @@ ${indentation} output = ${uniqueName}.\n`;
1833
1833
  if (!(node.get() instanceof Statements.Loop)) {
1834
1834
  return undefined;
1835
1835
  }
1836
+ if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
1837
+ return undefined;
1838
+ }
1836
1839
  const source = (_a = node.findDirectExpression(Expressions.LoopSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.SimpleSource2);
1837
1840
  if (source === undefined) {
1838
1841
  return undefined;
@@ -2428,7 +2431,7 @@ ${indentation} output = ${uniqueName}.\n`;
2428
2431
  throw new SkipToNextFile(issue);
2429
2432
  }
2430
2433
  findType(i, lowFile, highSyntax, ref = false) {
2431
- var _a;
2434
+ var _a, _b;
2432
2435
  const expr = i.findDirectExpression(Expressions.TypeNameOrInfer);
2433
2436
  if (expr === undefined) {
2434
2437
  return undefined;
@@ -2447,7 +2450,8 @@ ${indentation} output = ${uniqueName}.\n`;
2447
2450
  if (r.referenceType === _reference_1.ReferenceType.InferredType
2448
2451
  && r.resolved
2449
2452
  && r.position.getStart().equals(firstToken.getStart())
2450
- && r.resolved instanceof _typed_identifier_1.TypedIdentifier) {
2453
+ && r.resolved instanceof _typed_identifier_1.TypedIdentifier
2454
+ && ((_a = r.extra) === null || _a === void 0 ? void 0 : _a.foundQualified) === true) {
2451
2455
  inferred = r.resolved;
2452
2456
  break;
2453
2457
  }
@@ -2459,7 +2463,7 @@ ${indentation} output = ${uniqueName}.\n`;
2459
2463
  return inferred.getType().toABAP();
2460
2464
  }
2461
2465
  else {
2462
- return (_a = inferred.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
2466
+ return (_b = inferred.getType().getQualifiedName()) === null || _b === void 0 ? void 0 : _b.toLowerCase();
2463
2467
  }
2464
2468
  }
2465
2469
  outlineFS(low, high, lowFile, highSyntax) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.163",
3
+ "version": "2.113.165",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",