Community
Participate
Working Groups
Given this scenario: - class A define method m1 (with proteceted visibility) - class B extends class A and implements interface I and override method m1 (but with public visibility) - interface I define method m1 (with public visibility) The code is correct and compile using java 1.4 Let's modify the scenario: move the method B.m1 into a method introduction on aspect C, such that - class B extends class A - apsect C intosuces method m1 into B (with public visibility) and makes B implemts I (declare parents) - A and I as before The compiler reports this error: B.java:1 [error] The inherited method A.m1() cannot hide the public abstract method in I class B extends A {
Created attachment 17330 [details] class A which define protected method m1
Created attachment 17331 [details] class B which extends A (and inherits m1)
Created attachment 17332 [details] interface I which define method m1
Created attachment 17333 [details] aspect C which crosscut B
Thanks for the test programs. I've added them as a testcase and checked in the fix. We intercept the Java compiler error reporting mechanism in a few places and check if ITDs satisfy what the compiler thinks is an error. This bug highlights a missing case - I just made the ITD check and the program compiles fine. I will close the bug report when a build with the fix in becomes available (about 3 hours time).
Fix available: BUILD COMPLETE - build.442 Date of build: 01/20/2005 19:14:23 Time to build: 117 minutes 4 seconds Last changed: 01/20/2005 14:44:46 Last log entry: Fix for Bug 83303: complier error when mixing inheritance, overriding and polymorphism Latest good AspectJ jar available at: download.eclipse.org/technology/ajdt/dev/aspectj-DEVELOPMENT.jar