reintroduce virtual



reintroduce_virtual
Smart pascal source code
type TBase = class procedure Func; virtual; end; type TChild = class(TBase) procedure Func; reintroduce; virtual; end; type TSubChild = class(TChild) procedure Func; override; end; procedure TBase.Func; begin WriteLn(ClassName + ' here'); end; procedure TChild.Func; begin WriteLn(ClassName + ' now here'); end; procedure TSubChild.Func; begin WriteLn(ClassName + ' finally'); end; TBase.Create.Func; TChild.Create.Func; TSubChild.Create.Func; var o: TBase; o := TBase.Create; o.Func; o := TChild.Create; o.Func; o := TSubChild.Create; o.Func; {<<< RESULT - CONSOLE LOG >>> ----------------------------- TBase here TChild now here TSubChild finally TBase here TChild here TSubChild here ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}