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

Bug 342323

Summary: ITDs with local types cause name collisions with target type inner types
Product: [Tools] AspectJ Reporter: Andrew Clement <aclement>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: DEVELOPMENT   
Target Milestone: 1.6.12   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Andrew Clement CLA 2011-04-08 14:01:19 EDT
If an ITD uses an local anonymous type, it is a given a name based on the target, suffixed with an integer.  If the target type also uses local anonymous types, the names may clash.  The compiler won't detect this, instead whoever gets their classes put out 'last' gets their version of the classfile produced.  The type names already in use are stored in a table in the CompilationUnitScope called constantPoolNameUsage.  Because the aspect and the target are in different compilation units, they have different tables and thus don't see each other.

There are a couple of possible fixes:
1) use a variant naming scheme for those coming from the aspect.
2) enable the compilation unit scopes to see each other when aspects are involved.
Comment 1 Andrew Clement CLA 2011-04-08 19:36:15 EDT
used option 1, now fixed.  the name of the aspect is included ahead of the int.
Comment 2 Andrew Clement CLA 2011-04-11 16:39:09 EDT
committed