mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 16:47:53 +02:00
30 lines
268 B
ObjectPascal
30 lines
268 B
ObjectPascal
{$mode objfpc}
|
|
|
|
type
|
|
tc = class
|
|
procedure test; virtual;
|
|
end;
|
|
|
|
trec = record
|
|
c: tc;
|
|
end;
|
|
|
|
procedure tc.test;
|
|
begin
|
|
end;
|
|
|
|
procedure doit(r: trec);
|
|
begin
|
|
r.c.test;
|
|
end;
|
|
|
|
var
|
|
r: trec;
|
|
c: tc;
|
|
begin
|
|
c:=tc.create;
|
|
r.c:=c;
|
|
doit(r);
|
|
c.free;
|
|
end.
|