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...

Reply via email to