In our previous episode, Mark Morgan Lloyd said: That logical, since the constructors are not an virtual; and override; pair. > I find that if I explicitly decorate TB5500BaseUnit.Create() as virtual > and TB5500SPOUnit.Create() as override then TB5500SPOUnit.Create() is > called correctly.
That's the normal way. > I didn't think this was necessary, _why_ did you think this? > but on reflection I > assume that it's because u is declared as a TB5500BaseUnit: the > variable's compile-time rather than run-time class is being used for the > constructor unless explicitly overridden. In theory this kind of information could propagate in simple cases, but then behaviour would differ between cases where this information could be propagated (a deeper version called), and not (base version called). _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal