Project: AspectJ
Bug 120521 named pointcut not resolved in pertarget pointcut
Reported: 2005-12-13 03:18:43 | Status: resolved fixed

Get incorrect error "can't find pointcut ..." when declaring pertarget pointcut using pointcut declared outside the aspect. True of HEAD right now. Not true of pointcuts declared inside the aspect or issingleton aspects. I thought this was reported and fixed, but I couldn't find the bug. Sorry if it is a duplicate. ------------------------------------------------- package bugs; public class PerTargetSubaspectError { public static void main(String[] args) { C.run(); } static class C { static void run() {} } pointcut doit() : execution(void C.run()); // no error if not pertarget static aspect CPT pertarget(pc()){ // no error if doit() defined in CPT protected pointcut pc() : doit(); // unexpected CE before() : doit() {} // no CE } }

Files changed in fix:
tests/bugs150/pr120521/PerTargetSubaspectError.java tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java