[Issue 2563] Derived class is implicitly castable to Base class when inherited privately
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 7 13:36:21 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2563
smjg at iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg at iname.com
Keywords| |accepts-invalid
------- Comment #4 from smjg at iname.com 2009-01-07 15:36 -------
(In reply to comment #2)
> afaik public/private/protected inheritance is not supported in D it
> is just not prohibited to write it like in the sample though it
> always is publicly inherited.
What do you believe is the reason that D grammar goes out of its way to allow
this syntax?
> there should be a bug for enhancement to stop permiting this
> confusing syntactical feature.
Issue 177
Notice the real reason the feature doesn't make sense: it hides the methods
defined in Object, which are meant to be part of every class.
--
More information about the Digitalmars-d-bugs
mailing list