Bug 130869

Summary: Pointcut resolution fails against type variables
Product: [Tools] AspectJ Reporter: Adrian Colyer <adrian.colyer>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: adrian.colyer
Version: 1.5.0   
Target Milestone: 1.5.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Adrian Colyer CLA 2006-03-08 04:05:40 EST
Ok, so I'm on the bleeding edge of aspect design here... but I have a generic aspect of the form

public abstract aspect MyAspect<T extends Bar> { 

  declare warning : T.somePC() : "a match";

}

and Bar is defined as:

public abstract aspect Bar {

  public abstract pointcut somePC();

}

(yes, what that enables is indeed unbelievably cool).

We fail (perhaps unsurprisingly) when compiling the generic aspect because we can't find the pointcut somePC in T. We should of course be looking in the upper bound when searching for a pointcut in a type variable...
Comment 1 Adrian Colyer CLA 2006-03-08 04:05:57 EST
I'll take this one...
Comment 2 Adrian Colyer CLA 2006-03-08 05:59:19 EST
fix committed in CVS, waiting on build.
This gives us a capability I've been wanting for several years now...
Comment 3 Andrew Clement CLA 2006-03-28 02:51:56 EST
fix available.