I have problems concerning the expansion of the special 'this' variable when it is used inside a parametrized body called from a bundle which is itself called from another bundle with a 'usebundle' directive.
To illustrate this, consider the autonomous testcase below:
The verbose logs are inside the attached file 'cf.log'.
To sum up, three cases are tested:
- I use the parametrized body my_copy_with_param directly in the main a bundle
- I use the unparametrized body my_copy_without_param wthin the b bundle called from the a bundle with a usebundle directive
- I use parametrized body my_copy_with_param wthin the c bundle called from the a bundle with a usebundle directive
In the two bodies i use the variables this.bundle and this.promiser.
The two first cases are OK, the 'this' variable is correctly expanded as the calling bundle (a in the first case, b in the second case).
In the third case, the 'this' variable is not corrctly expanded, as it references the a bundle (the root bundle) whereas it should reference the c bundle, as it is the calling bundle. Il seems that the body parameter muddles in certain way the 'this' variable.
This bug, if it appears to be one, is potentially very harmful as a bundle (the c bundle in this case) never knows the context of its activation, directly in the bundlesequence or indirectly via a usebundle directive.