Bug 231478 - Generic aspects and changing bounds in a hierarchy
Summary: Generic aspects and changing bounds in a hierarchy
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 1.6.1   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-11 19:42 EDT by Andrew Clement CLA
Modified: 2008-05-11 22:01 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 2008-05-11 19:42:32 EDT
abstract aspect A<T extends One> {}
abstract aspect B<Q extends Two> extends A<Q> {}
(where Two extends One) currently fails to compile.

See mailing list post:
Hello,
 
First of all, I know this is not possible, as it says on the manual page.. but I was wondering why..
In plain Java you can redefine the upperbound of a type parameter, i.e.:
 
class AbstractComponent<C extends Component> {}
class AbstractWindow<W extends Window> extends AbstractComponent<W> {}
 
Now.. trying the same thing with aspects.. does not work:
 
abstract aspect AbstractComponentA<C extends Component> {}
abstract aspect AbstractWindowA<W extends Window> extends AbstractComponentA<W> {}
 
So.. my question, why isn't this supported? And what would be the "best" workaround?
 
Thanks in advance,
Mark
Comment 1 Andrew Clement CLA 2008-05-11 22:01:36 EDT
fix committed