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
outut is always the same, wether or not I use virtual for TFoo.Bar and
wether or not I use override for TFooChild.Bar declarations.

In case of FooChild: TFoo it outputs
"TFoo.bar"

In case of FooChild: TFooChild it outputs
"TFoo.Bar"
"TFooChild.Bar"
in all scenario's I could think of.

Bart
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to