Bug 268710

Summary: unhelpful/unnecessary error for a generic aspect
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.4   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Andrew Clement CLA 2009-03-16 00:51:09 EDT
After fixing the NPE for bug 268689, we compile this code:

package none;

public aspect ConcreteAspect extends GenericAspect<String> {

}


package none;

public abstract aspect GenericAspect<T> {

        interface SomeInterface {
        }

        pointcut SomeConstructor(SomeInterface var) : execution(* SomeInterface(..)) && this(var);
}

"parameterized types not supported for this and target pointcuts (erasure limitation)"

It is considered parameterized when resolved through the concrete sub-aspect which defines T as String.
Comment 1 Andrew Clement CLA 2009-03-16 14:40:17 EDT
fixed this.

And noticed whilst creating a real runnable test case that the syntax of the pointcut is actually wrong for catching constructor calls, it should be:

execution(SomeInterface+.new(..))

and not

execution(* SomeInterface(..))

The problem that needed fixing is that member types of a generic type are considered parameterized (inheriting the parameterization of their containing type) but this shouldn't be for interfaces.