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/bugs/SuperToIntro.java | |
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/bugs/SuperToIntro.java')
-rw-r--r-- | tests/bugs/SuperToIntro.java | 27 |
1 files changed, 27 insertions, 0 deletions
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"); + } +} |