diff options
author | jhugunin <jhugunin> | 2003-02-13 21:00:35 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-02-13 21:00:35 +0000 |
commit | 3e2801ad504e8f6b3fa7b50a42bf2706994e1727 (patch) | |
tree | 012a2d37b1c15c28adaf1990457b670bdc072ab5 /tests | |
parent | d49c9fdf6d4c334c2a0e6faa454a115616ea0712 (diff) | |
download | aspectj-3e2801ad504e8f6b3fa7b50a42bf2706994e1727.tar.gz aspectj-3e2801ad504e8f6b3fa7b50a42bf2706994e1727.zip |
fixed Bug 29959: super call in intertype method declaration body causes VerifyError
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ajcTests.xml | 6 | ||||
-rw-r--r-- | tests/ajcTestsFailing.xml | 7 | ||||
-rw-r--r-- | tests/bugs/SuperToIntro.java | 27 | ||||
-rw-r--r-- | tests/jimTests.xml | 15 |
4 files changed, 44 insertions, 11 deletions
diff --git a/tests/ajcTests.xml b/tests/ajcTests.xml index 58ac77e35..1d0501dd6 100644 --- a/tests/ajcTests.xml +++ b/tests/ajcTests.xml @@ -5560,4 +5560,10 @@ <compile files="AspectStaticInit.java"/> <run class="AspectStaticInit"/> </ajc-test> + + <ajc-test dir="bugs" pr="29959" + title="super call in intertype method declaration body causes VerifyError"> + <compile files="SuperToIntro.java"/> + <run class="SuperToIntro"/> + </ajc-test> </suite> diff --git a/tests/ajcTestsFailing.xml b/tests/ajcTestsFailing.xml index dd0d78673..4bdd8def6 100644 --- a/tests/ajcTestsFailing.xml +++ b/tests/ajcTestsFailing.xml @@ -51,4 +51,11 @@ <message kind="warning" line="73"/> </compile> </ajc-test> + + <ajc-test dir="bugs" pr="29959" + title="super call in intertype method declaration body causes VerifyError"> + <compile files="SuperToIntro.java"/> + <run class="SuperToIntro"/> + </ajc-test> + </suite> diff --git a/tests/bugs/SuperToIntro.java b/tests/bugs/SuperToIntro.java new file mode 100644 index 000000000..81c25bfdf --- /dev/null +++ b/tests/bugs/SuperToIntro.java @@ -0,0 +1,27 @@ +// from Bug#: 29959 +import org.aspectj.testing.Tester; + +aspect Foo { + String A.onlyA() { return "onlyA"; } + String A.foo() { return "Afoo"; } + String B.foo() { return super.foo() + ":" + onlyA() + ":" + super.getName(); } +} + +class A { + String getName() { return "A"; } +} +class B extends A { + String getName() { return "B"; } + + String onB1() { return foo() + ":" + onlyA() + ":" + getName(); } + String onB2() { return super.foo() + ":" + super.onlyA() + ":" + super.getName(); } +} + +public class SuperToIntro { + public static void main(String[] args) { + B b = new B(); + Tester.checkEqual(b.foo(), "Afoo:onlyA:A"); + Tester.checkEqual(b.onB1(), "Afoo:onlyA:A:onlyA:B"); + Tester.checkEqual(b.onB2(), "Afoo:onlyA:A"); + } +} diff --git a/tests/jimTests.xml b/tests/jimTests.xml index 23f82d378..0a867d719 100644 --- a/tests/jimTests.xml +++ b/tests/jimTests.xml @@ -1,18 +1,11 @@ <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"> <suite> - <ajc-test dir="bugs" pr="29691" - title="Static inner aspects cannot reference user defined pointcuts"> - <compile files="PcdLookup.java" /> - <run class="PcdLookup"/> - </ajc-test> + + + <!-- - <ajc-test dir="new" - title="work nicely with inner class method look-up rules and call-site advice" - keywords="from-resolved_10x"> - <compile files="InnerMethods.java"/> - <run class="InnerMethods"/> - </ajc-test> + --> </suite>
\ No newline at end of file |