On 12 Jun 2013, at 13:33, Bart wrote:
On 6/12/13, Jonas Maebe <jonas.ma...@elis.ugent.be> wrote:
So that it would still have the same behaviour if you changed the
variable
declaration to
var
FooChild: TFoo;
If I change FooChild to TFoo (and instantiate with TFoo.Create) the
Now change the variable type to TFoo but keep instantiating it using
TFooChild.Create (like I originally suggested). Having that work is
the whole point of polymorphism and why virtual/override exist.
Jonas
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal