summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0483.pp
blob: d473c487cb14c64abc1b3d425a71a5409440985c (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
{$mode delphi}
{ this should be only allowed in delphi mode; it's a delphi bug }
uses
  tb0483u;

type
  tmyclass2 = class(tmyclass1)
    procedure x(var l : longint);message 1234;
  end;

procedure tmyclass2.x(var l : longint);
  begin
    inherited;
  end;

var
  myclass2 : tmyclass2;
  l : longint;

begin
  myclass2:=tmyclass2.create;
  myclass2.x(l);
  myclass2.free;
  if testresult<>1 then
    begin
      writeln('error');
      halt(1);
    end;
  writeln('ok');
end.