Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] ajc versus javac

Its a case of variable shadowing

-----Original Message-----
From: Nuno Oliveira [mailto:noliveira@xxxxxx]
Sent: Wednesday, September 24, 2003 3:48 PM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] ajc versus javac


I have an abstract class with a public field 'result' and an abstract method
whose core for the context of my question is:

public abstract class myclass
{
	public Boolean result;

	public abstract void task();
}

I have a piece of code that looks more or less like this

void method()
{
	int result;

	myclass mc = new myclass(){
		public void task(){
			result = new Boolean(false); // error line
		}
	}
}

javac compiles this succefully. However, running ajc on it gives me the
error message "The field result is defined in an inherithed type and an
enclosing type" in the line mentioned above.

Can anyone shed some light on what's going on ? Is this an invalid idiom or
is it an ajc compiling bug ? I'm using ajc1.1.1 and jsdk1.4.0_01.

Thanks.

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top