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

* additionally implicit calling conventions of cdecl or mwpascal now work as well * adjusted tests + added tests Note: the generator for packages/univint needs to be fixed, until then building on macOS will be broken git-svn-id: trunk@43684 -
33 lines
384 B
ObjectPascal
33 lines
384 B
ObjectPascal
{ %target=darwin,iphonesim}
|
|
{ %skipcpu=powerpc,powerpc64 }
|
|
|
|
{$modeswitch cblocks}
|
|
|
|
type
|
|
tblock = reference to procedure; cdecl; cblock;
|
|
|
|
procedure test(b: tblock);
|
|
begin
|
|
b;
|
|
end;
|
|
|
|
procedure proc;
|
|
begin
|
|
writeln('called as block');
|
|
end;
|
|
|
|
const
|
|
bconst: tblock = @proc;
|
|
|
|
var
|
|
b: tblock;
|
|
begin
|
|
b:=@proc;
|
|
b;
|
|
test(@proc);
|
|
test(b);
|
|
bconst;
|
|
test(bconst);
|
|
end.
|
|
|