summaryrefslogtreecommitdiff
path: root/tests/tbs/tb0594.pp
blob: 2b89ed37ebe928021c75134fb928e22351b4791a (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
{$ifdef fpc}
{$mode delphi}
{$endif}

type
{$ifndef fpc}
  codepointer = pointer;
{$endif}
  tc = class
    class procedure test;
  end;

  tp = procedure;
  tp2 = procedure of object;

class procedure tc.test;
begin
end;

var
  p: tp;
  p2: tp2;
begin
  p:=tp(tc.test);
  p2:=tc.test;
  if codepointer(@p)<>tmethod(p2).code then
    halt(1);
end.