Bug 125791 - [generics] Another problem with abstract generic aspects in Jar files
Summary: [generics] Another problem with abstract generic aspects in Jar files
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-30 19:52 EST by david.pearce CLA
Modified: 2010-03-10 11:58 EST (History)
2 users (show)

See Also:


Attachments
Example code (822 bytes, application/octet-stream)
2006-01-30 19:52 EST, david.pearce CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description david.pearce CLA 2006-01-30 19:52:11 EST
abstract class Pair<FROM,TO> { }
class Road extends Pair<String,String> { }

abstract aspect AbstractAspect<FROM,TO,T extends Pair<FROM,TO>> {}
aspect RoadNetwork extends AbstractAspect<String,String,Road> {}

These classes will compile under ajc, so long as they are all compiled together.  However, if AbstractAspect + Pair are compiled separately and placed into a Jar file then the following error is given;

> [error] Type Road does not meet the specification for type parameter 3 (T 
> extends Pair<FROM,TO>) in generic type AbstractAspect
> public aspect RoadNetwork extends AbstractAspect<String,String,Road> { }
>               ^^^^^^^^^^

I'll attach a complete example!

Cheers,

Dave
Comment 1 david.pearce CLA 2006-01-30 19:52:54 EST
Created attachment 33835 [details]
Example code
Comment 2 david.pearce CLA 2006-01-30 19:55:39 EST
Removing "Pair<FROM,TO> => Pair" in AbstractAspect is a workaround.
Comment 3 Andrew Clement CLA 2007-10-23 12:09:09 EDT
diagnose in 1.5.4 timeframe
Comment 4 Andrew Clement CLA 2008-09-30 13:12:28 EDT
variation of changes in bug 242797 would fix this