Override member variables
Gheorghe Gabriel
knoppy273 at live.com
Sun May 20 06:04:07 UTC 2018
On Sunday, 20 May 2018 at 03:02:28 UTC, KingJoffrey wrote:
> On Saturday, 19 May 2018 at 18:09:56 UTC, Gheorghe Gabriel
> wrote:
>> And of course, you cannot override private members.
>
> wtf!
>
> what do you mean we cannot override private members!
I mean:
module base;
class Base {
protected int x = 1;
private int y = 2;
}
module a;
class A : Base {
override int x = 7;
override int y = 12; // error: y is not accessible
}
More information about the Digitalmars-d
mailing list