summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0226.pp
blob: c0b1852a305f9e20ba75b7e47c9148e8d8c4d057 (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
{ Old file: tbs0264.pp }
{ methodpointer bugss                                   OK 0.99.12b (FK) }

{$MODE DELPHI}

type
    a = class
        c : procedure of object;

        constructor create; virtual;
        destructor destroy; override;

        procedure e; virtual;
        procedure f; virtual;
    end;

constructor a.create;
begin
    c := e;
end;

destructor a.destroy;
begin
end;

procedure a.e;
begin
    Writeln('E');
    c := f;
end;

procedure a.f;
begin
    Writeln('F');
    c := e;
end;

var
    z : a;

begin
    z := a.create;
    z.c;
    z.c;
    z.c;
    z.free;
end.