@abaplint/transpiler-cli 2.10.29 → 2.10.31

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 +6 -6
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -78276,7 +78276,8 @@ class MethodCallTranspiler {
78276
78276
  name = m.name.toLowerCase() + "(";
78277
78277
  }
78278
78278
  if (feature_flags_1.FEATURE_FLAGS.private === true
78279
- && m?.def.getVisibility() === core_1.Visibility.Private) {
78279
+ && m?.def.getVisibility() === core_1.Visibility.Private
78280
+ && m?.def.isStatic() === false) {
78280
78281
  name = "#" + name;
78281
78282
  }
78282
78283
  const step = node.findDirectExpression(core_1.Expressions.MethodCallParam);
@@ -78581,16 +78582,14 @@ class MethodSourceTranspiler {
78581
78582
  else if (child.get() instanceof core_1.Expressions.Dynamic) {
78582
78583
  const second = child.getChildren()[1];
78583
78584
  const lookupException = traversal.lookupClassOrInterface("'CX_SY_DYN_CALL_ILLEGAL_METHOD'", child.getFirstToken(), true);
78584
- if (second.get() instanceof core_1.Expressions.FieldChain) {
78585
+ if (second.get() instanceof core_1.Expressions.FieldChain && second instanceof core_1.Nodes.ExpressionNode) {
78585
78586
  if (call.endsWith(".")) {
78586
78587
  call = call.substring(0, call.length - 1);
78587
78588
  }
78588
78589
  if (call === "") {
78589
78590
  call = "this";
78590
78591
  }
78591
- call += "[";
78592
- call += traversal.traverse(second).getCode();
78593
- call += ".get().toLowerCase().trimEnd()]";
78592
+ call = `abap.dynamicCallLookup(${call}, ${traversal.traverse(second).getCode()})`;
78594
78593
  }
78595
78594
  else if (second.get() instanceof core_1.Expressions.Constant) {
78596
78595
  if (call === "") {
@@ -84508,7 +84507,8 @@ class MethodImplementationTranspiler {
84508
84507
  // https://github.com/tc39/proposal-class-fields
84509
84508
  let isPrivate = "";
84510
84509
  if (feature_flags_1.FEATURE_FLAGS.private === true
84511
- && method?.getVisibility() === abaplint.Visibility.Private) {
84510
+ && method?.getVisibility() === abaplint.Visibility.Private
84511
+ && method.isStatic() === false) {
84512
84512
  isPrivate = "#";
84513
84513
  }
84514
84514
  if (method && method.isStatic()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.10.29",
3
+ "version": "2.10.31",
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.107",
31
- "@abaplint/transpiler": "^2.10.29",
31
+ "@abaplint/transpiler": "^2.10.31",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^22.13.13",
34
34
  "@types/progress": "^2.0.7",