dup field in sub-class should be reported by the compiler
Walter Bright
newshound1 at digitalmars.com
Mon Aug 13 17:48:32 PDT 2007
Walter Bright wrote:
> Brad Roberts wrote:
>> On Mon, 13 Aug 2007, Walter Bright wrote:
>>> I just don't see the issue.
>>
>> Apply this same logic to variable shadowing. Shadowing has been
>> declared illegal.
>
> While pedantically it is the same logic, but practically I think it's
> very different. I don't see writing derived classes like one writes a
> nested scope.
I want to add to that. For a nested scope, there really isn't any
barrier to renaming something. For a derived class, however, you have
users of it, and you may need to specifically hide a base member.
More information about the Digitalmars-d
mailing list