id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
63,Wrong transformation for inner classes,Bernhard Haumacher (haui at haumacher dot de),,"Access to variables of the enclosing class from inner classes is not possible and gives an error in transformed code.
=== Workaround ===
Write full qualified access patterns for the variable like in the following example:


{{{
class A {
   int x;
   class B {
      void foo() {
         A.this.x = 13;
      }  
   }
}  
}}}

=== Evaluation ===
There are two options to fix this issue:

 * The computation of access patterns during the JavaParty transformation must be adapted to inner classes.
 * The order of the transformation steps form remote classes and inner classes must be changed.

Since the inner class trafo is no source to source transformation, it cannot be done before the JP trafo, because the JP trafo expects source code and generates source code.

=== Solution ===
The computation of the full qualified name for all variable accesses was changet in order to account for inner classes. 

=== Problem ===
All variables are now accessed with fully qualified names (after the remote class transformation). 
But final variables can not be initialized with a fully qualified name. 

Variables of remote classes are problematic, because the the remote class changes its name during the transformation. But remote classes are not supported at all, so this fix should work in most cases.

=== Test ===
{{{
jp.test.TestInner
}}}

=== See also ===
ticket:110
",defect,closed,normal,1.04d,JP trafo,,normal,fixed,,
