mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-26 17:58:43 +02:00
32 lines
564 B
Java
32 lines
564 B
Java
|
|
import org.aspectj.testing.Tester;
|
|
|
|
// PR#290 compiler crashes with eachobject and named pointcuts with parameters
|
|
|
|
public class Driver {
|
|
|
|
public static String s = "";
|
|
|
|
public static void main(String[] args){
|
|
new C().go();
|
|
Tester.checkEqual(s, "-before-go", "");
|
|
}
|
|
|
|
}
|
|
|
|
class C {
|
|
int x;
|
|
|
|
public void go() {
|
|
Driver.s += "-go";
|
|
}
|
|
}
|
|
|
|
aspect A /*of eachobject(A.testPointcut(C))*/ {
|
|
pointcut testPointcut(C c): target(c);
|
|
|
|
before(C c): target(c) && call(* *(..)) {
|
|
Driver.s += "-before";
|
|
}
|
|
}
|