@abaplint/cli 2.102.32 → 2.102.34

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.
Files changed (2) hide show
  1. package/build/cli.js +15 -3
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -20845,6 +20845,9 @@ class CurrentScope {
20845
20845
  }
20846
20846
  return false;
20847
20847
  }
20848
+ isGlobalOO() {
20849
+ return this.parentObj.getType() === "INTF" || this.parentObj.getType() === "CLAS";
20850
+ }
20848
20851
  isTypePool() {
20849
20852
  var _a;
20850
20853
  return ((_a = this.current) === null || _a === void 0 ? void 0 : _a.getIdentifier().filename.endsWith(".type.abap")) === true || false;
@@ -29341,7 +29344,8 @@ class InsertInternal {
29341
29344
  if (t) {
29342
29345
  targetType = new target_1.Target().runSyntax(t, scope, filename);
29343
29346
  }
29344
- if (targetType instanceof basic_1.TableType && node.findDirectTokenByText("LINES") === undefined) {
29347
+ if (targetType instanceof basic_1.TableType
29348
+ && node.findDirectTokenByText("LINES") === undefined) {
29345
29349
  targetType = targetType.getRowType();
29346
29350
  }
29347
29351
  let source = node.findDirectExpression(Expressions.SimpleSource4);
@@ -29359,7 +29363,8 @@ class InsertInternal {
29359
29363
  new fstarget_1.FSTarget().runSyntax(afterAssigning, scope, filename, sourceType);
29360
29364
  }
29361
29365
  }
29362
- if (new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType) === false) {
29366
+ if (node.findDirectTokenByText("INITIAL") === undefined
29367
+ && new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType) === false) {
29363
29368
  throw new Error("Types not compatible");
29364
29369
  }
29365
29370
  const afterInto = node.findExpressionAfterToken("INTO");
@@ -31426,6 +31431,13 @@ class Type {
31426
31431
  && (found === null || found === void 0 ? void 0 : found.getType().containsVoid()) === false) {
31427
31432
  throw new Error("TYPES definition cannot be generic, " + found.getName());
31428
31433
  }
31434
+ if (scope.isGlobalOO() && found.getType() instanceof basic_1.PackedType) {
31435
+ const concat = node.concatTokens().toUpperCase();
31436
+ if ((concat.includes(" TYPE P ") || concat.includes(" TYPE P."))
31437
+ && concat.includes(" DECIMALS ") === false) {
31438
+ throw new Error("Specify DECIMALS in OO context for packed");
31439
+ }
31440
+ }
31429
31441
  return found;
31430
31442
  }
31431
31443
  const fallback = node.findFirstExpression(Expressions.NamespaceSimpleName);
@@ -48765,7 +48777,7 @@ class Registry {
48765
48777
  }
48766
48778
  static abaplintVersion() {
48767
48779
  // magic, see build script "version.sh"
48768
- return "2.102.32";
48780
+ return "2.102.34";
48769
48781
  }
48770
48782
  getDDICReferences() {
48771
48783
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.102.32",
3
+ "version": "2.102.34",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.102.32",
41
+ "@abaplint/core": "^2.102.34",
42
42
  "@types/chai": "^4.3.5",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.2",