diff options
-rw-r--r-- | org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip | bin | 3833250 -> 3814272 bytes | |||
-rw-r--r-- | org.eclipse.jdt.core/jdtcore-for-aspectj.jar | bin | 4280493 -> 4280346 bytes | |||
-rw-r--r-- | tests/bugs/pr71723/bar/Bar.aj | 36 | ||||
-rw-r--r-- | tests/bugs/pr71723/foo/Foo.java | 17 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java | 5 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml | 10 |
6 files changed, 67 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip b/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip Binary files differindex f41d84e60..2f0d8b38a 100644 --- a/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip +++ b/org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip diff --git a/org.eclipse.jdt.core/jdtcore-for-aspectj.jar b/org.eclipse.jdt.core/jdtcore-for-aspectj.jar Binary files differindex 4c486ebb9..695acc053 100644 --- a/org.eclipse.jdt.core/jdtcore-for-aspectj.jar +++ b/org.eclipse.jdt.core/jdtcore-for-aspectj.jar 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 diff --git a/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java b/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java index c857b40ca..d72492811 100644 --- a/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc121/Ajc121Tests.java @@ -236,10 +236,13 @@ public class Ajc121Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // s.indexOf("CAUSE=org.aspectj.lang.NoAspectBoundException")!=-1); } - public void test044_ITDnameClashes() { runTest("ITD name clashes with private members"); } + public void test045_ITDprotectedVisibility() { + runTest("Inconsistency in scoping of protected members in ITDs"); + } + } diff --git a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml index e6f71c3c0..3116d9a50 100644 --- a/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml +++ b/tests/src/org/aspectj/systemtest/ajc121/ajc121-tests.xml @@ -345,3 +345,13 @@ </compile> </ajc-test> + <ajc-test dir="bugs/pr71723" pr="71723" + title="Inconsistency in scoping of protected members in ITDs"> + <compile files="foo/Foo.java,bar/Bar.aj"> + <message kind="error" line="8" text="The method i() from the type Foo is not visible"/> + <message kind="error" line="9" text="The method ancientI() from the type Foo is not visible"/> + <message kind="error" line="10" text="The method ancientJ() from the type AncientFoo is not visible"/> + <message kind="error" line="11" text="The method clone() from the type Object is not visible"/> + <message kind="error" line="12" text="The method clone() from the type Object is not static"/> + </compile> + </ajc-test>
\ No newline at end of file |