diff options
Diffstat (limited to 'tests/bugs/pr71723')
-rw-r--r-- | tests/bugs/pr71723/bar/Bar.aj | 36 | ||||
-rw-r--r-- | tests/bugs/pr71723/foo/Foo.java | 17 |
2 files changed, 53 insertions, 0 deletions
diff --git a/tests/bugs/pr71723/bar/Bar.aj b/tests/bugs/pr71723/bar/Bar.aj new file mode 100644 index 000000000..e7a5e00a3 --- /dev/null +++ b/tests/bugs/pr71723/bar/Bar.aj @@ -0,0 +1,36 @@ +package bar; + +import foo.Foo; + +aspect Bar { + public void Foo.doing() { +try { + System.out.println(i()); // CE L8 + System.out.println(ancientI()); // CE L9 + System.out.println(ancientJ()); // CE L10 + System.out.println(this.clone()); // CE L11 + System.out.println(clone()); // CE L12 +} +catch(Throwable t) { } + } + before(Foo f) : call(* doStuff(..)) && target(f) { + f.doing(); + } +} + + +privileged aspect PBar { + public void Foo.doingMore() { +try { + System.out.println(i()); + System.out.println(ancientI()); + System.out.println(ancientJ()); + } +catch(Throwable t) { } + } + before(Foo f) : call(* doStuff(..)) && target(f) { + f.doing(); + } +} + + diff --git a/tests/bugs/pr71723/foo/Foo.java b/tests/bugs/pr71723/foo/Foo.java new file mode 100644 index 000000000..628cb86f0 --- /dev/null +++ b/tests/bugs/pr71723/foo/Foo.java @@ -0,0 +1,17 @@ +package foo; + + + +public class Foo extends AncientFoo { + protected int i() { return 42; } + public static void main(String[] args) { + new Foo().doStuff(); + } + public void doStuff() { } + protected int ancientI() { return 42; } +} + +class AncientFoo { + protected int ancientI() { return -42; } + protected int ancientJ() { return 0; } +}
\ No newline at end of file |