Find the heir.

Stefan Koch uplink.coder at gmail.com
Sun Mar 29 15:02:26 UTC 2020


On Sunday, 29 March 2020 at 14:04:53 UTC, TodNaz wrote:
> Hello!
>>class A
>>{
>>    ...
>>}
>>
>>class B : A
>>{
>>    ...
>>}
>>
>>class C : A
>>{
>>    ...
>>}
>>
>>A example1;
>>B example2 = new B(...);
>>A = example2;
>>auto heir = A.whoheir(); ///
>
> The question in this code is: is it possible to track the class 
> inheritor? Or is it beyond D?
> Sorry if the question is fool ...

It is not generally known who has inherited a class from the 
parents perspective.



More information about the Digitalmars-d-learn mailing list