[fpc-pascal] Inherited and not virtual/overridden procedures
jonas.maebe at elis.ugent.be
Wed Jun 12 13:39:39 CEST 2013
On 12 Jun 2013, at 13:33, Bart wrote:
> On 6/12/13, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
>> So that it would still have the same behaviour if you changed the
>> declaration to
>> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal