summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw18443.pp
blob: c42c8a1f7e996f56694ed4126613c172f20f2e2c (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
30
31
32
program tw18433;
{$mode objfpc}
type
  TBase = class
    function Print: String; virtual;
  end;

  TDesc1 = class(TBase)
    function Print: String; override;
  end;

  TDesc2 = class(TBase)
    function Print: String; override;
  end;

function TBase.Print: String;
begin
  Result := 'Base';
end;

function TDesc1.Print: String;
begin
  Result := inherited + '-Desc1';
end;

function TDesc2.Print: String;
begin
  Result := inherited Print + '-Desc2';
end;

begin
end.