mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-30 23:13:40 +02:00

U packages/univint/fpmake.pp ... --- Recording mergeinfo for merge of r42499 into '.': U . --- Merging r42500 into '.': U packages/cocoaint/fpmake.pp ... --- Recording mergeinfo for merge of r42500 into '.': G . --- Merging r42548 into '.': G packages/univint/src/AUComponent.pas G packages/univint/src/AudioUnitProperties.pas --- Recording mergeinfo for merge of r42548 into '.': G . --- Merging r43684 into '.': U compiler/msg/errore.msg ... --- Recording mergeinfo for merge of r43684 into '.': G . --- Merging r43687 into '.': G packages/univint/src/AudioComponents.pas U packages/univint/src/AudioServices.pas --- Recording mergeinfo for merge of r43687 into '.': G . git-svn-id: branches/fixes_3_2@44035 -
53 lines
796 B
ObjectPascal
53 lines
796 B
ObjectPascal
{ %target=darwin,iphonesim}
|
|
{ %skipcpu=powerpc,powerpc64 }
|
|
|
|
{$mode delphi}
|
|
{$modeswitch cblocks}
|
|
|
|
type
|
|
tblock = reference to procedure(j: longint); cdecl; cblock;
|
|
|
|
tc = class
|
|
i: longint;
|
|
procedure callme(j: longint);
|
|
end;
|
|
|
|
var
|
|
b: tblock;
|
|
p: procedure(j: longint) of object;
|
|
c: tc;
|
|
|
|
procedure tc.callme(j: longint);
|
|
const
|
|
invocationcount: longint = 0;
|
|
begin
|
|
writeln('self: ',hexstr(pointer(self)),', i: ',i,', j: ',j);
|
|
if self<>c then
|
|
halt(1);
|
|
if i<>12345 then
|
|
halt(2);
|
|
if invocationcount=0 then
|
|
begin
|
|
if j<>1 then
|
|
halt(3)
|
|
end
|
|
else if j<>2 then
|
|
halt(4);
|
|
inc(invocationcount);
|
|
end;
|
|
|
|
procedure test(b: tblock);
|
|
begin
|
|
b(2);
|
|
end;
|
|
|
|
begin
|
|
c:=tc.create;
|
|
c.i:=12345;
|
|
b:=c.callme;
|
|
b(1);
|
|
test(c.callme);
|
|
test(b);
|
|
end.
|
|
|