diff options
author | aclement <aclement> | 2005-01-20 14:44:39 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-01-20 14:44:39 +0000 |
commit | 5d281fd8e98c5c2bec4365d3fc340e2d5f04becc (patch) | |
tree | 03948e1c15e0786e75a09899c4e957f8f00da415 /tests | |
parent | 759be74616a981dc6002a9e7e6bc64223d28bda0 (diff) | |
download | aspectj-5d281fd8e98c5c2bec4365d3fc340e2d5f04becc.tar.gz aspectj-5d281fd8e98c5c2bec4365d3fc340e2d5f04becc.zip |
Fix for Bug 83303: complier error when mixing inheritance, overriding and polymorphism
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs150/PR83303.java | 26 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150TestsNoHarness.java | 5 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs150/PR83303.java b/tests/bugs150/PR83303.java new file mode 100644 index 000000000..a81efda82 --- /dev/null +++ b/tests/bugs150/PR83303.java @@ -0,0 +1,26 @@ + + +// Protected method in A +class A { + protected void m1 (){System.err.println("A.m1()");} +} + + +// Simple subclass +public class PR83303 extends A { + public static void main(String []argv) { + System.err.println("Hi"); + new PR83303().m1(); + } +} + + +aspect C { + declare parents: PR83303 implements I; + public void PR83303.m1(){System.err.println("ITD version of m1");} +} + + +interface I { + public void m1(); +} diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150TestsNoHarness.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150TestsNoHarness.java index 9c4c08fdc..0fa039be0 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150TestsNoHarness.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150TestsNoHarness.java @@ -73,6 +73,11 @@ public class Ajc150TestsNoHarness extends TestUtils { // } } + public void testCanOverrideProtectedMethodsViaITDandDecp_pr83303() { + CompilationResult cR = ajc(baseDir,new String[]{"PR83303.java"}); + assertTrue("Should be no errors:"+cR,!cR.hasErrorMessages()); + } + |