[DGD] function clash weirdness

Shentino shentino at gmail.com
Wed Jan 25 19:19:01 CET 2006


Meh, was just baffled why it did NOT complain when I inherited from
only two parents.  If I only inherited LIB_USER and API_USER, then dgd
doesn't complain.

weird...oh well.  Easy to fix ;)

On 1/25/06, Noah Gibbs <noah_gibbs at yahoo.com> wrote:
>  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
> __________________________________________
> http://mail.dworkin.nl/mailman/listinfo/dgd
>




More information about the DGD mailing list