aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-05-02 20:36:06 +0000
committerjhugunin <jhugunin>2003-05-02 20:36:06 +0000
commitbcdbd68f76629692a5e780702086bff96cdc4c7c (patch)
treef34261e11877f35a765cc5c10e570eab1af9b6d3 /tests/bugs
parentfafdaa404c28c821c3349e7d950afb6a4c8dd790 (diff)
downloadaspectj-bcdbd68f76629692a5e780702086bff96cdc4c7c.tar.gz
aspectj-bcdbd68f76629692a5e780702086bff96cdc4c7c.zip
fix and better tests for
Bugzilla Bug 37152 java.lang.VerifyError:
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/inlineAround/aspect1/Base.java30
-rw-r--r--tests/bugs/inlineAround/aspect2/Concrete.java7
-rw-r--r--tests/bugs/inlineAround/p1/Main.java26
3 files changed, 63 insertions, 0 deletions
diff --git a/tests/bugs/inlineAround/aspect1/Base.java b/tests/bugs/inlineAround/aspect1/Base.java
new file mode 100644
index 000000000..e61f34648
--- /dev/null
+++ b/tests/bugs/inlineAround/aspect1/Base.java
@@ -0,0 +1,30 @@
+package aspect1;
+
+public abstract aspect Base {
+ private Helper h = new Helper();
+ {
+ h.h1 = new Helper();
+ h.h1.h1 = new Helper();
+ }
+
+ private class Inner {
+ String data = "inner";
+ }
+
+ protected abstract pointcut where();
+
+ Object around(double d, int i): where() && args(i, d) {
+ String s = h.data + h.h1.data + h.h1.h1.data + d + i;
+ System.err.println(s);
+ return proceed(d, i);
+ }
+}
+
+
+class Helper {
+ String data = "helper";
+ Helper h1;
+ String getData() {
+ return data;
+ }
+} \ No newline at end of file
diff --git a/tests/bugs/inlineAround/aspect2/Concrete.java b/tests/bugs/inlineAround/aspect2/Concrete.java
new file mode 100644
index 000000000..f065fa9f1
--- /dev/null
+++ b/tests/bugs/inlineAround/aspect2/Concrete.java
@@ -0,0 +1,7 @@
+package aspect2;
+
+import aspect1.Base;
+
+aspect Concrete extends Base perthis(where()) {
+ protected pointcut where(): call(* *..C.*(..));
+} \ No newline at end of file
diff --git a/tests/bugs/inlineAround/p1/Main.java b/tests/bugs/inlineAround/p1/Main.java
new file mode 100644
index 000000000..bf44127c7
--- /dev/null
+++ b/tests/bugs/inlineAround/p1/Main.java
@@ -0,0 +1,26 @@
+package p1;
+
+public class Main {
+ public static void main(String[] args) {
+ new Main().doit();
+ }
+
+ private void doit() {
+ long l = 2l + testit(3.2, new C().doit(23, 3.14), 5l);
+ System.err.println(l);
+ }
+
+ private long testit(double d, long l1, long l2) {
+ return (long)(d + l1 + l2);
+ }
+}
+
+class C {
+ long doit(int i, double d) {
+ return (long)(d + i + f1(d, i, i));
+ }
+
+ int f1(double d1, long l1, int i1) {
+ return (int)(d1 + l1 + i1);
+ }
+} \ No newline at end of file