summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw3292.pp
blob: 12e3879aa521d11241d40af6c672434cf4cf06af (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ Source provided for Free Pascal Bug Report 3292 }
{ Submitted by "Vincent Snijdes" on  2004-09-03 }
{ e-mail: vslist@zonnet.nl }
program bug3292;

{$ifdef fpc}{$mode objfpc}{$H+}{$endif}

uses
  Classes, uw3292a;

type
  TDerived = class(TMiddle)
  private
    procedure a(var m); message 1;
    procedure b; override;
  end;

{ TDerived }

procedure TDerived.a(var m);
begin
  writeln('A; In TDerived');
  inc(acnt);
  inherited a(m);
end;

procedure TDerived.b;
begin
  writeln('B: In TDerived');
  inc(bcnt);
  inherited b;
end;

var
  o: TDerived;
  m: longint;

begin
  o := TDerived.Create;
  acnt:=0;
  bcnt:=0;
  o.a(m);
  o.b;
  if acnt<>2 then
    halt(1);
  if bcnt<>2 then
    halt(1);
end.