[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] field name conflict

Looks like a bug to me. AspectJ compiler should treat ITDs of privileged aspect as if there are public introduction overriding any access specification on the declaration itself.


On Mon, Feb 4, 2008 at 2:07 PM, Dehua Zhang <dehua.zhang@xxxxxxxxxxxxxx> wrote:

See the sample code below,

public class OneType {
       private String r;

privileged aspect A {
       private int OneType.r; //no error

Since aspect A is declared as privileged, so it should have access to the private filed "String OneType.r", therefore, the ITD "int OneType.r" is conflict with the "String OneType.r", I got no warning regarding this.

However, I got an error for the following code,
privileged aspect A {
       public int OneType.r; //[error] inter-type declaration from A conflicts with existing member: java.lang.String onType.r

Is this an intended behavior or a bug? I tried both 1.5.4 and DEVELOPMENT-20080125213731.

Dehua Zhang
Sable Research Group, McGill University
Montréal, Québec, Canada

aspectj-users mailing list