protection for superclass
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sat May 6 13:27:51 PDT 2006
"Frank Benoit" <keinfarbton at nospam.xyz> wrote in message
news:e3igf5$3lc$1 at digitaldaemon.com...
> If I do this
>
> class T : private D {
> }
>
> the functionality from Object is no more visible to a user of T.
> e.g. container can complain, they cannot access opEqual. Is this the
> wanted behaviour?
Weird, didn't know that that was even legal D. I guess, after looking at
the class spec, that it is, but it's not documented.
What's more, I can't reproduce it.
class A
{
}
class B : private A
{
}
void main()
{
B b = new B;
B b2 = new B;
if(b == b2)
writefln("knife!");
}
That works fine. Is there something that your superclass D does perhaps
that makes opEquals invisible?
More information about the Digitalmars-d
mailing list