123456789101112131415161718192021222324252627 |
- program twith;
- {$mode delphi}
- type
- twithbase = class
- end;
- twithchild = class(twithbase)
- procedure test; virtual;
- end;
- procedure twithchild.test;
- begin
- end;
- function func: twithbase;
- begin
- result:=twithchild.create;
- end;
- begin
- with twithchild(func) do
- test;
- end.
|