ldmud-3.2.9/doc/
ldmud-3.2.9/doc/efun/
ldmud-3.2.9/mud/
ldmud-3.2.9/mud/heaven7/
ldmud-3.2.9/mud/heaven7/lib/
ldmud-3.2.9/mud/lp-245/
ldmud-3.2.9/mud/lp-245/banish/
ldmud-3.2.9/mud/lp-245/doc/
ldmud-3.2.9/mud/lp-245/doc/examples/
ldmud-3.2.9/mud/lp-245/doc/sefun/
ldmud-3.2.9/mud/lp-245/log/
ldmud-3.2.9/mud/lp-245/obj/Go/
ldmud-3.2.9/mud/lp-245/players/lars/
ldmud-3.2.9/mud/lp-245/room/death/
ldmud-3.2.9/mud/lp-245/room/maze1/
ldmud-3.2.9/mud/lp-245/room/sub/
ldmud-3.2.9/mud/lp-245/secure/
ldmud-3.2.9/mud/morgengrauen/
ldmud-3.2.9/mud/morgengrauen/lib/
ldmud-3.2.9/mud/sticklib/
ldmud-3.2.9/mud/sticklib/src/
ldmud-3.2.9/mudlib/uni-crasher/
ldmud-3.2.9/pkg/
ldmud-3.2.9/pkg/debugger/
ldmud-3.2.9/pkg/diff/
ldmud-3.2.9/pkg/misc/
ldmud-3.2.9/src/autoconf/
ldmud-3.2.9/src/bugs/
ldmud-3.2.9/src/bugs/MudCompress/
ldmud-3.2.9/src/bugs/b-020916-files/
ldmud-3.2.9/src/bugs/doomdark/
ldmud-3.2.9/src/bugs/ferrycode/ferry/
ldmud-3.2.9/src/bugs/ferrycode/obj/
ldmud-3.2.9/src/bugs/psql/
ldmud-3.2.9/src/done/
ldmud-3.2.9/src/done/order_alist/
ldmud-3.2.9/src/done/order_alist/obj/
ldmud-3.2.9/src/done/order_alist/room/
ldmud-3.2.9/src/gcc/
ldmud-3.2.9/src/gcc/2.7.0/
ldmud-3.2.9/src/gcc/2.7.1/
ldmud-3.2.9/src/hosts/
ldmud-3.2.9/src/hosts/GnuWin32/
ldmud-3.2.9/src/hosts/amiga/NetIncl/
ldmud-3.2.9/src/hosts/amiga/NetIncl/netinet/
ldmud-3.2.9/src/hosts/amiga/NetIncl/sys/
ldmud-3.2.9/src/hosts/i386/
ldmud-3.2.9/src/hosts/msdos/byacc/
ldmud-3.2.9/src/hosts/msdos/doc/
ldmud-3.2.9/src/hosts/os2/
ldmud-3.2.9/src/hosts/win32/
ldmud-3.2.9/src/util/
ldmud-3.2.9/src/util/erq/
ldmud-3.2.9/src/util/indent/hosts/next/
ldmud-3.2.9/src/util/xerq/
ldmud-3.2.9/src/util/xerq/lpc/
ldmud-3.2.9/src/util/xerq/lpc/www/
Short: bug in virtual inheritance...
Date: Tue, 11 Apr 2000 06:43:47 -0500
From: Casey Zacek <cz@800hosting.com>
Type: Bug
State: Done - fixed in 3.2.8-dev.186
See also: b-000207-4


Problem was that the compiler used the first inherited function it
could find. With normal inherits this is the topmost one, with virtual
inherits this is not guaranteed.


Description:
/* a.c --------------------------------------------------------- */
inherit "b.c";

func1() {
   write("a::func1 1 ---------------------------------------\n");
   ::func1();
   write("a::func1 2 ---------------------------------------\n");
}
/* ------------------------------------------------------------- */

/* b.c --------------------------------------------------------- */
virtual inherit "c.c";

func1() {
   write("b::func1 1 ---------------------------------------\n");
   ::func1();
   write("b::func1 2 ---------------------------------------\n");
}
/* ------------------------------------------------------------- */

/* c.c --------------------------------------------------------- */
int var;

create() {
   write("c::create 1 ++++++++++++++++++++++++++++++++++++++\n");
   func1();
   write("c::create 2 ++++++++++++++++++++++++++++++++++++++\n");
}

func1() {
   write("c::func1 -----------------------------------------\n");
}
/* ------------------------------------------------------------- */

If the "int var;" line doesn't exist in c.c, and a.c is loaded (after
c.c and b.c to spare you spurious output), it looks like this:

c::create 1 ++++++++++++++++++++++++++++++++++++++
a::func1 1 ---------------------------------------
b::func1 1 ---------------------------------------
c::func1 -----------------------------------------
b::func1 2 ---------------------------------------
a::func1 2 ---------------------------------------
c::create 2 ++++++++++++++++++++++++++++++++++++++

However, if it is there, it looks like this:

c::create 1 ++++++++++++++++++++++++++++++++++++++
a::func1 1 ---------------------------------------
c::func1 -----------------------------------------
a::func1 2 ---------------------------------------
c::create 2 ++++++++++++++++++++++++++++++++++++++

func1() doesn't get called in b.c!

I haven't tried to track it down at the driver level yet, and I don't
know where I'd start with it, but it took us a long time to get down
to this much LPC.  Enjoy! :)

-- 
-- Casey Zacek
   Senior Staff Engineer
   1-800-Hosting.com