]> source.dussan.org Git - aspectj.git/commitdiff
@testcase no such constructor for proceed argument (error) V_1_1_b5
authorwisberg <wisberg>
Fri, 28 Feb 2003 08:21:53 +0000 (08:21 +0000)
committerwisberg <wisberg>
Fri, 28 Feb 2003 08:21:53 +0000 (08:21 +0000)
(compiler throwing NPE)

tests/ajcTestsFailing.xml
tests/binding/UnfoundConstructor.java [new file with mode: 0644]

index 9fb315fa5c08e2eef161b1895bf210dfaba8c244..cec2b7a687b36a6026d06d8b5276cd6d34d9c0f3 100644 (file)
         </compile>
     </ajc-test>
 
+    <ajc-test dir="binding"
+      title="no such constructor for proceed argument (error)">
+        <compile files="UnfoundConstructor.java">
+               <message kind="error" line="25"/>
+        </compile>
+    </ajc-test>
+
 </suite>
diff --git a/tests/binding/UnfoundConstructor.java b/tests/binding/UnfoundConstructor.java
new file mode 100644 (file)
index 0000000..d3d39a5
--- /dev/null
@@ -0,0 +1,27 @@
+
+
+import org.aspectj.testing.Tester;
+
+/** @testcase no such constructor for proceed argument (error) */
+public class UnfoundConstructor {
+    public static void main (String[] args) {
+        I i = new B();
+        String s = i.toString();
+    } 
+}
+
+
+interface I { }
+
+class B implements I { }
+
+class Mock implements I {
+    Mock(B toMock) { }
+}
+
+aspect A {
+    Object around(I targ) : 
+        target(targ) && target(B) && call(* *(..)) {
+        return proceed(new Mock(targ)); // CE 25: no such constructor
+    }
+}