mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 21:59:27 +02:00

tests o currently not yet integrated in the makefile system, use testall.sh/ testall.bat to run the tests git-svn-id: branches/jvmbackend@18777 -
28 lines
291 B
ObjectPascal
28 lines
291 B
ObjectPascal
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.
|