Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348082 - [compiler] Internal Role pattern with deeply nested team gives compile error in generated code
Summary: [compiler] Internal Role pattern with deeply nested team gives compile error ...
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 0.8   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 2.1 M6   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-02 11:21 EDT by Stephan Herrmann CLA
Modified: 2013-02-20 13:48 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.