diff options
author | acolyer <acolyer> | 2004-08-18 12:39:40 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-08-18 12:39:40 +0000 |
commit | dfb15c1777ab6995528a0a0d49faf0ef74578db6 (patch) | |
tree | c4191b121d6f1c297116f7a08f8403e3a9f59633 /tests/bugs/pr71723 | |
parent | 5b902242b00ffaf3105335f231e45291e7d09320 (diff) | |
download | aspectj-dfb15c1777ab6995528a0a0d49faf0ef74578db6.tar.gz aspectj-dfb15c1777ab6995528a0a0d49faf0ef74578db6.zip |
fix for Bugzilla Bug 71723
Inconsistency in scoping of protected members in ITDs
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 |