Protected Members in Class

Salih Dincer salihdb at hotmail.com
Fri Dec 24 10:14:06 UTC 2021


On Friday, 24 December 2021 at 08:35:38 UTC, Salih Dincer wrote:
> What do I need to do to see that the protected is active, need 
> a separate module?
>
> ```d
> // Source: https://tour.dlang.org/tour/en/basics/classes

Addition made for one of the inherited class:

```d
override string convertToString() {
         import std.conv : to;
         // The swiss army knife of conversion.
         this.type = "int";
         return to!string(type);
     }
```
The type is not there but it is changed without super! Why?

Thanks...


More information about the Digitalmars-d-learn mailing list