]> source.dussan.org Git - aspectj.git/commitdiff
regression test - provokes VerifyError in 1.1.1 but not in cvs head
authorwisberg <wisberg>
Sun, 7 Mar 2004 22:42:45 +0000 (22:42 +0000)
committerwisberg <wisberg>
Sun, 7 Mar 2004 22:42:45 +0000 (22:42 +0000)
tests/ajcTests.xml
tests/new/SuperClosure.java [new file with mode: 0644]

index df4451ee2ce53c2511c2b9e808e4c8676c75854a..1897a556b6535c47f8fbb847a9c75a57298dba5b 100644 (file)
         <compile files="IntertypeDifferentThrows.java" />
     </ajc-test>
     
+       <ajc-test dir="new" 
+               comment="in ajc 1.1.1, VerifyError Illegal use of nonvirtual function call"
+               title="super call in anonymous class created in around advice">
+        <compile files="SuperClosure.java" />
+        <run class="SuperClosure" />
+    </ajc-test>
+
 </suite>
diff --git a/tests/new/SuperClosure.java b/tests/new/SuperClosure.java
new file mode 100644 (file)
index 0000000..5597631
--- /dev/null
@@ -0,0 +1,21 @@
+
+public class SuperClosure {
+       public static void main(String[] args) {
+       }
+}
+
+aspect A {
+       void around() : execution(void main(String[])) {
+               Runner runner = new Runner() {
+                       public void run() {
+                               // ajc 1.1.1 VerifyError: Illegal use of nonvirtual function call
+                  super.run();
+                       }
+               };
+               runner.run();
+       }
+}
+class Runner implements Runnable {
+       public void run() {
+       }
+}