summaryrefslogtreecommitdiffstats
path: root/tests/pureJava/QualifiedSuperCall.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pureJava/QualifiedSuperCall.java')
-rw-r--r--tests/pureJava/QualifiedSuperCall.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/pureJava/QualifiedSuperCall.java b/tests/pureJava/QualifiedSuperCall.java
new file mode 100644
index 000000000..d7c2f2835
--- /dev/null
+++ b/tests/pureJava/QualifiedSuperCall.java
@@ -0,0 +1,50 @@
+import org.aspectj.testing.Tester;
+
+class PackageSuper {
+ String field = "PackageSuper";
+
+ void m() {
+ Tester.event("PackageSuper.m()");
+ }
+}
+
+public class QualifiedSuperCall extends PackageSuper{
+ String field = "Package";
+
+ class InnerSuper {
+ String field = "InnerSuper";
+
+ void m() {
+ Tester.event("InnerSuper.m()");
+ }
+ }
+
+ class Inner {
+ String field = "Inner";
+
+ Inner() {
+ QualifiedSuperCall.super.m();
+ Tester.checkAndClearEvents(new String[] { "PackageSuper.m()" } );
+ }
+
+
+ void m() {
+ Tester.event("Inner.m()");
+ Tester.event("QualifiedSuperCall.super.field = " +
+ QualifiedSuperCall.super.field);
+ QualifiedSuperCall.super.m();
+ }
+
+ }
+
+ public static void main(String[] args) {
+ new QualifiedSuperCall().new Inner().m();
+ Tester.checkEvents(new String[] { "Inner.m()", "PackageSuper.m()",
+ "QualifiedSuperCall.super.field = PackageSuper"});
+ }
+
+ void m() {
+ Tester.event("Package.m()");
+ }
+}
+