Bug 29691

Summary: Static inner aspects cannot reference user defined pointcuts
Product: [Tools] AspectJ Reporter: Nicholas Lesiecki <ndlesiecki>
Component: CompilerAssignee: Jim Hugunin <jim-aj>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Nicholas Lesiecki CLA 2003-01-17 03:36:44 EST
Compiling:

package cantfind;
public class SomeObject {

    public static void main(String[] args) {
    }
    
    public static aspect Referencer{
        pointcut mainCall() : call(void main(..));
        pointcut myMainCall() : mainCall(); 
    }   
}

with:

C:\aopbook_tech\aop7>ajc -Xlint -sourceroots cantfind

yields:

can't find referenced pointcut

1 error

Commenting out the myMainCall() declaration fixes the error.
Comment 1 Jim Hugunin CLA 2003-01-21 13:33:30 EST
fixed in cvs, test case in bugs/PcdLookup.java