summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw3255.pp
blob: 82e0d215428bb954b3743f46ba5bf986fb9f57f8 (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
{ Source provided for Free Pascal Bug Report 3255 }
{ Submitted by "Patrick Dietrich" on  2004-08-17 }
{ e-mail: patrick.dietrich@informatik.uni-ulm.de }
program testclassptr;

{$mode delphi}

type
  TProc = procedure (Sender: TClass) of object;

  TTest = class
  public
    class procedure foo;
    class procedure bar(Sender: TClass);
    class procedure baz(proc: TProc);
  end;

class procedure TTest.foo;
begin
  baz(bar);
end;

class procedure TTest.bar;
begin
  writeln('hello world');
end;

class procedure TTest.baz;
begin
  proc(self);
end;

begin
  TTest.foo;
end.