@abaplint/core 2.95.5 → 2.95.6

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.
@@ -179,17 +179,24 @@ class BasicTypes {
179
179
  }
180
180
  return type;
181
181
  }
182
+ cloneType(type, qualifiedName) {
183
+ // nested types(containing "-") will inherit the qualified names if possible
184
+ // todo, this needs to be extended to all AbstractTypes instead of just CharacterType
185
+ if (type instanceof basic_1.CharacterType
186
+ && qualifiedName
187
+ && qualifiedName.includes("-") === false) {
188
+ type = type.cloneType(qualifiedName);
189
+ }
190
+ return type;
191
+ }
182
192
  resolveTypeName(typeName, length, decimals, qualifiedName) {
183
193
  var _a;
184
194
  if (typeName === undefined) {
185
195
  return undefined;
186
196
  }
187
- let chain = this.resolveTypeChain(typeName);
197
+ const chain = this.resolveTypeChain(typeName);
188
198
  if (chain) {
189
- if (chain instanceof basic_1.CharacterType && qualifiedName) {
190
- chain = chain.cloneType(qualifiedName);
191
- }
192
- return chain;
199
+ return this.cloneType(chain, qualifiedName);
193
200
  }
194
201
  const chainText = typeName.concatTokens().toUpperCase();
195
202
  const f = this.scope.getDDIC().lookupBuiltinType(chainText, length, decimals, qualifiedName);
@@ -223,10 +230,7 @@ class BasicTypes {
223
230
  else if (ddic.type instanceof basic_1.VoidType) {
224
231
  this.scope.addReference(typeName.getFirstToken(), undefined, _reference_1.ReferenceType.VoidType, this.filename);
225
232
  }
226
- if (ddic.type instanceof basic_1.CharacterType && qualifiedName) {
227
- ddic.type = ddic.type.cloneType(qualifiedName);
228
- }
229
- return ddic.type;
233
+ return this.cloneType(ddic.type, qualifiedName);
230
234
  }
231
235
  return undefined;
232
236
  }
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.95.5";
66
+ return "2.95.6";
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.5",
3
+ "version": "2.95.6",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",