@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.
- package/build/src/traversal.js +5 -0
- package/package.json +1 -1
package/build/src/traversal.js
CHANGED
|
@@ -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) {
|