spogulis no
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-26 17:58:43 +02:00
35 rindas
713 B
Java
35 rindas
713 B
Java
import org.aspectj.testing.*;
|
|
public class CannotReferenceSuper {
|
|
|
|
public static void main(String[] args) {
|
|
new CannotReferenceSuper().go();
|
|
}
|
|
|
|
static {
|
|
Tester.expectEventsInString("a.go,aa.go,b.go,bb.go");
|
|
}
|
|
|
|
void go() {
|
|
new A().go();
|
|
new B().go();
|
|
Tester.checkAllEvents();
|
|
}
|
|
|
|
class A {
|
|
class AA extends A {
|
|
void go() { Tester.event("aa.go"); }
|
|
}
|
|
void go() { Tester.event("a.go"); new AA().go(); }
|
|
}
|
|
|
|
class B extends A {
|
|
class BB extends AA {
|
|
void go() { Tester.event("bb.go"); }
|
|
}
|
|
void go() { Tester.event("b.go"); new BB().go(); }
|
|
|
|
}
|
|
}
|
|
|
|
|