From 6e6e48e258a7c35cc82ba1a96fe3bafb994d70c4 Mon Sep 17 00:00:00 2001 From: wisberg Date: Fri, 28 Feb 2003 08:21:53 +0000 Subject: [PATCH] @testcase no such constructor for proceed argument (error) (compiler throwing NPE) --- tests/ajcTestsFailing.xml | 7 +++++++ tests/binding/UnfoundConstructor.java | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 tests/binding/UnfoundConstructor.java diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml index 9fb315fa5..cec2b7a68 100644 --- a/tests/ajcTestsFailing.xml +++ b/tests/ajcTestsFailing.xml @@ -52,4 +52,11 @@ + + + + + + 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 + } +} -- 2.39.5