Is it a bug that a parent class that access its own private members from derived classes gets deprecation warning?

bauss jj_1337 at live.dk
Wed Apr 11 19:13:04 UTC 2018


On Wednesday, 11 April 2018 at 17:58:25 UTC, Jonathan M Davis 
wrote:
> On Sunday, April 08, 2018 13:00:02 bauss via Digitalmars-d 
> wrote:
>> [...]
>
> I don't know. It could be argued either way. I think that the 
> logic as to why
>
> [...]

The thing is, it makes no sense why it shouldn't be legal since 
you can just cast to the base type, by that alone you're escaping 
the restriction that it's supposed to have.

And it really goes against that private is module level.

If it was module level then you should be able to access the 
member regardless of the reference to it.


More information about the Digitalmars-d mailing list