Re: eieio.el: initialize-instance: strange behavior with simple class hierarchy

"Eric M. Ludlam" <[email protected]> Sun, 27 Sep 2009 22:38:12 -0400
Newsgroups gmane.emacs.eieio
Message-ID <[email protected]>
Hi,

Thanks for the detailed bug report.

Your multiple inheritance example stymied the very simple duplicate
removal system that was already in there.  I added your example to the
test suite, and fixed the bug.  It should be in CVS now.

Thanks
Eric

On Sat, 2009-09-26 at 03:46 +0200, Jan Moringen wrote:
> Hi,
> 
> I think I may have found a bug in EIEIO. If it is not a bug, it is at
> least surprising behavior.
> 
> I discovered the problem when working with a class hierarchy that looks
> like this
> 
> a
> +-d
> 
> b
> +-c
>   +-d
> 
> a and b have initialize-instance :after methods, d has a primary
> initialize-instance method.
> 
> When creating a d object, I expect the constructors to run as follows:
> 
>      1. (initialize-instance d)
>      2. (initialize-instance b)
>      3. (initialize-instance a)
> 
> or
> 
>      1. (initialize-instance d) 
>      2. (initialize-instance a) 
>      3. (initialize-instance b)
> 
> but what really happens is
> 
>      1. (initialize-instance d) 
>      2. (initialize-instance b) 
>      3. (initialize-instance a)
>      4. (initialize-instance b)
>      5. (initialize-instance a)
> 
> I think, this is wrong, but maybe I did not understand :after or
> call-next-method correctly.
> 
> Redefining the involved classes and methods changes something and
> sometimes makes the duplicate runs go away.
> 
> The attached code should produce the problem with CVS CEDET.
> 
> Any help would be greatly appreciated.
> 
> Kind regards,
> Jan
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________ cedet-eieio mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cedet-eieio

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf