@abaplint/transpiler-cli 2.7.86 → 2.7.87

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/bundle.js +12 -2
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -19899,6 +19899,9 @@ class CurrentScope {
19899
19899
  }
19900
19900
  return false;
19901
19901
  }
19902
+ isGlobalOO() {
19903
+ return this.parentObj.getType() === "INTF" || this.parentObj.getType() === "CLAS";
19904
+ }
19902
19905
  isTypePool() {
19903
19906
  var _a;
19904
19907
  return ((_a = this.current) === null || _a === void 0 ? void 0 : _a.getIdentifier().filename.endsWith(".type.abap")) === true || false;
@@ -28414,7 +28417,7 @@ class InsertInternal {
28414
28417
  new fstarget_1.FSTarget().runSyntax(afterAssigning, scope, filename, sourceType);
28415
28418
  }
28416
28419
  }
28417
- if (afterAssigning === undefined
28420
+ if (node.findDirectTokenByText("INITIAL") === undefined
28418
28421
  && new _type_utils_1.TypeUtils(scope).isAssignableStrict(sourceType, targetType) === false) {
28419
28422
  throw new Error("Types not compatible");
28420
28423
  }
@@ -30482,6 +30485,13 @@ class Type {
30482
30485
  && (found === null || found === void 0 ? void 0 : found.getType().containsVoid()) === false) {
30483
30486
  throw new Error("TYPES definition cannot be generic, " + found.getName());
30484
30487
  }
30488
+ if (scope.isGlobalOO() && found.getType() instanceof basic_1.PackedType) {
30489
+ const concat = node.concatTokens().toUpperCase();
30490
+ if ((concat.includes(" TYPE P ") || concat.includes(" TYPE P."))
30491
+ && concat.includes(" DECIMALS ") === false) {
30492
+ throw new Error("Specify DECIMALS in OO context for packed");
30493
+ }
30494
+ }
30485
30495
  return found;
30486
30496
  }
30487
30497
  const fallback = node.findFirstExpression(Expressions.NamespaceSimpleName);
@@ -47821,7 +47831,7 @@ class Registry {
47821
47831
  }
47822
47832
  static abaplintVersion() {
47823
47833
  // magic, see build script "version.sh"
47824
- return "2.102.33";
47834
+ return "2.102.34";
47825
47835
  }
47826
47836
  getDDICReferences() {
47827
47837
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.86",
3
+ "version": "2.7.87",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -26,12 +26,12 @@
26
26
  "author": "abaplint",
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@abaplint/transpiler": "^2.7.86",
29
+ "@abaplint/transpiler": "^2.7.87",
30
30
  "@types/glob": "^7.2.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.5",
33
33
  "@types/node": "^20.5.7",
34
- "@abaplint/core": "^2.102.33",
34
+ "@abaplint/core": "^2.102.34",
35
35
  "progress": "^2.0.3",
36
36
  "webpack": "^5.88.2",
37
37
  "webpack-cli": "^5.1.4",