@abaplint/transpiler 2.13.45 → 2.13.46

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.
@@ -482,10 +482,15 @@ class Traversal {
482
482
  }
483
483
  buildThisAttributes(def, cName) {
484
484
  let ret = "";
485
+ const constants = def.getAttributes()?.getConstants() || [];
485
486
  for (const a of def.getAttributes()?.getAll() || []) {
486
487
  let escaped = Traversal.escapeNamespace(a.getName().toLowerCase());
487
488
  if (a.getMeta().includes("static" /* abaplint.IdentifierMeta.Static */) === true) {
488
489
  ret += "this." + escaped + " = " + cName + "." + escaped + ";\n";
490
+ const isConstant = constants.some(c => c.getName().toUpperCase() === a.getName().toUpperCase());
491
+ if (a.getVisibility() === abaplint.Visibility.Private && isConstant === false) {
492
+ ret += `this.FRIENDS_ACCESS_INSTANCE["${escaped}"] = this.${escaped};\n`;
493
+ }
489
494
  }
490
495
  else {
491
496
  if (a.getVisibility() === abaplint.Visibility.Private) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.13.45",
3
+ "version": "2.13.46",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",