diff options
author | acolyer <acolyer> | 2005-08-23 08:48:47 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-08-23 08:48:47 +0000 |
commit | 0f0c63e0b25968d4bd74bfb0d9d34f7ff9e642c6 (patch) | |
tree | 5add5b510977594f874e348e1890d942ec4387a9 /tests/bugs150 | |
parent | 58567c7b2c849f4d35f49e117ab8531527b63f7a (diff) | |
download | aspectj-0f0c63e0b25968d4bd74bfb0d9d34f7ff9e642c6.tar.gz aspectj-0f0c63e0b25968d4bd74bfb0d9d34f7ff9e642c6.zip |
has member tests + tests and fix for pr107486
Diffstat (limited to 'tests/bugs150')
-rw-r--r-- | tests/bugs150/pr107486.aj | 9 | ||||
-rw-r--r-- | tests/bugs150/pr107486part2.aj | 30 |
2 files changed, 39 insertions, 0 deletions
diff --git a/tests/bugs150/pr107486.aj b/tests/bugs150/pr107486.aj new file mode 100644 index 000000000..cc7ffeb86 --- /dev/null +++ b/tests/bugs150/pr107486.aj @@ -0,0 +1,9 @@ +public class pr107486 { + public Object f() { + return new Object() { + public String toString() { + return "f"; + } + }; + } +}
\ No newline at end of file diff --git a/tests/bugs150/pr107486part2.aj b/tests/bugs150/pr107486part2.aj new file mode 100644 index 000000000..f438d56ae --- /dev/null +++ b/tests/bugs150/pr107486part2.aj @@ -0,0 +1,30 @@ +public class pr107486part2 { + public Object f() { + return new Object() { + public String toString() { + return "f"; + } + }; + } + public Object g() { + return new Object() { + public String toString() { + return "g"; + } + }; + } + + public static void main(String[] args) { + pr107486part2 p = new pr107486part2(); + System.out.println(p.f()); + System.out.println(p.g()); + } +} + +aspect ToStringDecorator { + + Object around() : execution(* toString()) { + return new String("[advised] " + proceed()); + } + +}
\ No newline at end of file |