@abaplint/core 2.97.8 → 2.97.9

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.
@@ -192,12 +192,24 @@ class TypeUtils {
192
192
  }
193
193
  isAssignableStrict(source, target) {
194
194
  var _a;
195
+ /*
196
+ console.dir(source);
197
+ console.dir(target);
198
+ */
195
199
  if (source instanceof basic_1.CharacterType && target instanceof basic_1.CharacterType) {
196
200
  if (((_a = source.getAbstractTypeData()) === null || _a === void 0 ? void 0 : _a.derivedFromConstant) === true) {
197
201
  return source.getLength() <= target.getLength();
198
202
  }
199
203
  return source.getLength() === target.getLength();
200
204
  }
205
+ else if (source instanceof basic_1.StringType && target instanceof basic_1.StructureType) {
206
+ for (const c of target.getComponents()) {
207
+ if (c.type instanceof basic_1.StringType) {
208
+ return false;
209
+ }
210
+ }
211
+ return true;
212
+ }
201
213
  return this.isAssignable(source, target);
202
214
  }
203
215
  isAssignable(source, target) {
@@ -209,12 +221,14 @@ class TypeUtils {
209
221
  if (target.isWithHeader()) {
210
222
  return this.isAssignable(source, target.getRowType());
211
223
  }
212
- if (source instanceof basic_1.TableType
213
- || source instanceof basic_1.VoidType
224
+ if (source instanceof basic_1.VoidType
214
225
  || source instanceof basic_1.AnyType
215
226
  || source instanceof basic_1.UnknownType) {
216
227
  return true;
217
228
  }
229
+ else if (source instanceof basic_1.TableType) {
230
+ return this.isAssignableStrict(source.getRowType(), target.getRowType());
231
+ }
218
232
  return false;
219
233
  }
220
234
  else if (target instanceof basic_1.ObjectReferenceType && source instanceof basic_1.ObjectReferenceType) {
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.97.8";
66
+ return "2.97.9";
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.97.8",
3
+ "version": "2.97.9",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",