diff options
author | wisberg <wisberg> | 2003-02-28 08:21:53 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-02-28 08:21:53 +0000 |
commit | 6e6e48e258a7c35cc82ba1a96fe3bafb994d70c4 (patch) | |
tree | 7af1dc347c305b7c920756c2a631b816f290bc5f /tests | |
parent | 95bac1813803c0b268fe8a93960bfe34df7c15de (diff) | |
download | aspectj-6e6e48e258a7c35cc82ba1a96fe3bafb994d70c4.tar.gz aspectj-6e6e48e258a7c35cc82ba1a96fe3bafb994d70c4.zip |
@testcase no such constructor for proceed argument (error)
V_1_1_b5
(compiler throwing NPE)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ajcTestsFailing.xml | 7 | ||||
-rw-r--r-- | tests/binding/UnfoundConstructor.java | 27 |
2 files changed, 34 insertions, 0 deletions
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 @@ </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 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 + } +} |