summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw22869.pp
blob: b07d45a90d04112e6e5d64790c398462cb221611 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{$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.