Bug 342323 - ITDs with local types cause name collisions with target type inner types
Summary: ITDs with local types cause name collisions with target type inner types
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 1.6.12   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-08 14:01 EDT by Andrew Clement CLA
Modified: 2011-04-11 16:39 EDT (History)
0 users

See Also:


Attachments

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