Project: AspectJ
Bug 83303 complier error when mixing inheritance, overriding and polymorphism
Reported: 2005-01-20 08:47:23 | Status: resolved fixed

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 {

Files changed in fix:
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java tests/bugs150/PR83303.java tests/src/org/aspectj/systemtest/ajc150/Ajc150TestsNoHarness.java