Empty body |
Smart pascal source code
type TTest = class function Test: Integer; empty; function Virt: String; virtual; empty; method Proc; empty; end; type TSub = class(TTest) function Virt: String; override; begin WriteLn('here'); Result := '[' + inherited Virt + ']'; end; end; { main.pas } var t := new TTest; WriteLn(t.Test); WriteLn('-' + t.Virt + '-'); t.Proc; t := new TSub; WriteLn(t.Test); WriteLn('-' + t.Virt + '-'); t.Proc; { <<< CONSOLE OUTPUTS >>> 0 -- 0 here -[]- }