@abaplint/transpiler-cli 2.10.73 → 2.10.75

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 +11 -2
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -80787,16 +80787,25 @@ class TargetTranspiler {
80787
80787
  }
80788
80788
  else if (c.get() instanceof core_1.Expressions.AttributeName) {
80789
80789
  let prefix = "";
80790
+ let postfix = "";
80790
80791
  if (context instanceof abaplint.BasicTypes.ObjectReferenceType) {
80791
80792
  const cdef = traversal.findClassDefinition(context.getIdentifierName(), scope);
80792
80793
  const attr = cdef?.getAttributes().findByName(c.getFirstToken().getStr());
80793
80794
  if (feature_flags_1.FEATURE_FLAGS.PRIVATE_ATTRIBUTES === true
80794
80795
  && attr?.getVisibility() === abaplint.Visibility.Private) {
80795
- prefix = "#";
80796
+ const id = scope?.getParent()?.getParent()?.getIdentifier();
80797
+ if (id?.stype === abaplint.ScopeType.ClassImplementation
80798
+ && cdef?.getName().toUpperCase() === id.sname.toUpperCase()) {
80799
+ prefix = "#";
80800
+ }
80801
+ else {
80802
+ prefix = `FRIENDS_ACCESS_INSTANCE["`;
80803
+ postfix = `"]`;
80804
+ }
80796
80805
  }
80797
80806
  }
80798
80807
  const intf = traversal_1.Traversal.escapeNamespace(traversal.isInterfaceAttribute(c.getFirstToken()));
80799
- let name = prefix + traversal_1.Traversal.escapeNamespace(c.getFirstToken().getStr()).replace("~", "$").toLowerCase();
80808
+ let name = prefix + traversal_1.Traversal.escapeNamespace(c.getFirstToken().getStr()).replace("~", "$").toLowerCase() + postfix;
80800
80809
  if (intf && name.startsWith(intf) === false) {
80801
80810
  name = intf + "$" + name;
80802
80811
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.10.73",
3
+ "version": "2.10.75",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "devDependencies": {
30
30
  "@abaplint/core": "^2.113.149",
31
- "@abaplint/transpiler": "^2.10.73",
31
+ "@abaplint/transpiler": "^2.10.75",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^22.16.5",
34
34
  "@types/progress": "^2.0.7",