Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] inter-type declaration conflicts with existing member

hi,

i get this error, but only if i compile my web framework and a project
using it together. (as opposed to build a standalone framework jar and
use it with aspectpath to build the project)

but the qustion is this:

class X
{
}

class Y extends X
{
	void init()
	{
		super.init();
	}
}

aspect A
{
	interface I {};

	declare parents: X implements I;

	public void I.init()
	{
	}
}

i inject a declaration into X and then try to override it in Y. if i
have X in the seperately compiled framework jar, then it works as
expected. but if i compile all sources in one phase then i get the
conflict error.

imho, it would be enough to stop with error if X had a "void init()",
and optionally issue a warning if any subclass of X has a "void init()".

is there an agreement about this issue?

also is it possible to compile this setup in one phase at all?

thanks,

- 101



Back to the top