On 12 Jun 2013, at 00:12, Bart wrote: > var > FooChild: TFooChild; > > begin > FooChild := TFooChild.Create; > FooChild.Bar; > FooChild.Free; > end. > > To my surprise this compiles without any warning or error. > It outputs: > C:\Users\Bart\LazarusProjecten\ConsoleProjecten>test > TFoo.Bar > TFooChild.Bar > > Why then would I need virtual and override anymore?
So that it would still have the same behaviour if you changed the variable declaration to var FooChild: TFoo; Jonas_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal