mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-13 15:45:38 +02:00
17 lines
470 B
Java
17 lines
470 B
Java
|
|
class A { void run() {} }
|
|
class B extends A {}
|
|
aspect C {
|
|
before() : runB() { }
|
|
pointcut runB(): call(void B.run()); // CW 6 XLint, for each shadow (12, 14)
|
|
|
|
}
|
|
public class CompoundMessage {
|
|
public static void main(String[] args) {
|
|
// ok with -1.4; otherwise, becomes A.run in bytecode
|
|
new B().run(); // CW 12 DW
|
|
// never works - compile-time type of reference is A, not B
|
|
new B().run(); // CW 12 DW
|
|
}
|
|
}
|