summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbf/tw13135.pp
blob: c7197a73acbe610b681ce23d72d4a7684d816356 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ %fail }
{$mode objfpc}

type
  ta = class
  end;

  tb = class(ta)
  end;

procedure test(var a: ta);
begin
  a.free;
  a:=ta.create;
  // now b contains an instance of type "ta"
end;

var
  b: tb;
begin
  test(b);
end.