Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348082

Summary: [compiler] Internal Role pattern with deeply nested team gives compile error in generated code
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTJAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.8   
Target Milestone: 2.1 M6   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Stephan Herrmann CLA 2011-06-02 11:21:29 EDT
Given this code:

package bug346801;
team class Outer {
   protected team class Mid {
	     protected team class Inner playedBy Mid {
	
	     }
   }
}

the compiler reports this error against Inner:
  "The blank final field base may not have been initialized"
Comment 1 Stephan Herrmann CLA 2012-02-23 12:57:29 EST
Should address this as soon as bug 247564 has been backed out of the OTDT, too.
Currently, the new id-computation from that bug complicates the issue at hand.
Comment 2 Stephan Herrmann CLA 2012-03-01 09:15:27 EST
Resolved for 2.1 M6 via commit a26c24944ff8b879c9ea9d6e51de47467ea9a30f

Translation in DeclaredLifting.prepareArgLifting() wrongly detected a lifting constructor as a team constructor needing preparation for declared lifting.
The point is we need better detection of a role *of the current team*, to distinguish this from an *enclosing* role.
With the above mis-detection, the "base" argument was renamed to "_OT$base" thus hiding the field we need to assign in the lifting constructor. The compiler error was actually correct, the generated AST was wrong.
Comment 3 Stephan Herrmann CLA 2013-02-20 13:48:00 EST
Verified using 2.2.0 M5.