aboutsummaryrefslogtreecommitdiffstats
path: root/tests/binding
diff options
context:
space:
mode:
Diffstat (limited to 'tests/binding')
-rw-r--r--tests/binding/UnfoundConstructor.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/binding/UnfoundConstructor.java b/tests/binding/UnfoundConstructor.java
new file mode 100644
index 000000000..d3d39a5fc
--- /dev/null
+++ b/tests/binding/UnfoundConstructor.java
@@ -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
+ }
+}