subclass to base class but not subclass pointer to base class pointer?

Namespace rswhite4 at googlemail.com
Sat Apr 20 07:56:24 PDT 2013


Why can D implicitly cast from the subclass to the base class, 
but not implicitly from the subclasse pointer to the base class 
pointer?

This works: http://dpaste.1azy.net/30dd34a0
This not: http://dpaste.1azy.net/ffacfd83

Makes not much sense for me.


More information about the Digitalmars-d-learn mailing list