@abaplint/core 2.95.36 → 2.95.37

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.
@@ -52,22 +52,21 @@ class ComponentChain {
52
52
  }
53
53
  else if (context instanceof basic_1.ObjectReferenceType) {
54
54
  const id = context.getIdentifier();
55
- if (id instanceof types_1.InterfaceDefinition || id instanceof types_1.ClassDefinition) {
56
- const found = id.getAttributes().findByName(name);
57
- context = found === null || found === void 0 ? void 0 : found.getType();
58
- if (context === undefined) {
59
- throw new Error("Attribute \"" + name + "\" not found");
60
- }
61
- else {
62
- const extra = {
63
- ooName: id.getName(),
64
- ooType: id instanceof types_1.ClassDefinition ? "CLAS" : "INTF"
65
- };
66
- scope.addReference(child.getFirstToken(), found, _reference_1.ReferenceType.DataWriteReference, filename, extra);
67
- }
55
+ const def = scope.findObjectDefinition(id.getName());
56
+ if (def === undefined) {
57
+ throw new Error(id.getName() + " not found in scope");
58
+ }
59
+ const found = def.getAttributes().findByName(name);
60
+ context = found === null || found === void 0 ? void 0 : found.getType();
61
+ if (context === undefined) {
62
+ throw new Error("Attribute \"" + name + "\" not found");
68
63
  }
69
64
  else {
70
- throw new Error("ComponentChain, unexpected type2");
65
+ const extra = {
66
+ ooName: id.getName(),
67
+ ooType: id instanceof types_1.ClassDefinition ? "CLAS" : "INTF"
68
+ };
69
+ scope.addReference(child.getFirstToken(), found, _reference_1.ReferenceType.DataWriteReference, filename, extra);
71
70
  }
72
71
  }
73
72
  else {
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.95.36";
66
+ return "2.95.37";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.95.36",
3
+ "version": "2.95.37",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",