[DGD] function clash weirdness

Noah Gibbs noah_gibbs at yahoo.com
Wed Jan 25 18:20:02 CET 2006


  Well, it's just that "::create()" means "call the create function of the
parent".  Since both LIB_USER and API_ACCOUNT have a create() function, you'll
need to specify which one you want.  So it *is* a valid reason for DGD to
complain, right?

--- Shentino <shentino at gmail.com> wrote:

> Something I find odd is that if you inherit three (or more?) objects,
> they all have to have labels or you get a clash error.
> 
> Here's the code:
> 
> inherit LIB_USER;
> inherit account API_ACCOUNT; /* my own account manager api */
> inherit user API_USER;
> 
> /* ... */
> 
> static void create(int clone)
> {
>     if (clone) {
>         ::create();  /* here I get an "ambiguous call to ::create" */
>         account::create();
>         user::create()
>     }
> }
> 
> But if I stop inheriting API_ACCOUNT, the error goes away.
> 
> What's going on?  Am I doing something stupid?
> 
> __________________________________________
> http://mail.dworkin.nl/mailman/listinfo/dgd
> 




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the DGD mailing list