reimplementing an interface in a derived class

Alex sascha.orlov at
Fri Jan 4 08:46:24 UTC 2019

On Friday, 4 January 2019 at 07:37:43 UTC, bauss wrote:
> No, because you OVERRIDE A's foo().
> A does not exist. A is B and when you cast B to A you just tell 
> the compiler that the reference should only have A's signature 
> available.
> You're not assigning B to A.

Let's assume this is right. How to force a B object to behave 
like an A object? I thought casting is a possible approach...

More information about the Digitalmars-d-learn mailing list