what if return returned subclasses

Adam D Ruppe destructionator at gmail.com
Thu Oct 21 20:06:54 UTC 2021


On Thursday, 21 October 2021 at 14:43:03 UTC, 12345swordy wrote:
> You want the ability to create new types?

No, it just returns the same thing you passed in. The function 
works on the interface/base class on the inside, but if the 
compiler knows it returns the same thing you passed in the 
argument, it can keep it as the child class on the outside.


More information about the Digitalmars-d mailing list