fpc/tests/webtbs/tw22869.pp
2012-09-13 12:35:31 +00:00

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.