mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-15 10:09:15 +02:00
no message
This commit is contained in:
parent
5305828f39
commit
627420ae56
32
tests/tbs/tb0486.pp
Normal file
32
tests/tbs/tb0486.pp
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{ $mode delphi}
|
||||||
|
type
|
||||||
|
tprocedure = procedure;
|
||||||
|
pprocedure = ^tprocedure;
|
||||||
|
|
||||||
|
var
|
||||||
|
l : longint;
|
||||||
|
|
||||||
|
function _f1 : plongint;
|
||||||
|
begin
|
||||||
|
result:=@l;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
f1 : function : plongint;
|
||||||
|
f2 : function : pprocedure;
|
||||||
|
|
||||||
|
procedure p;
|
||||||
|
begin
|
||||||
|
l:=2;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
f1^:=1;
|
||||||
|
if l<>1 then
|
||||||
|
halt(1);
|
||||||
|
f2^:=p;
|
||||||
|
f2^;
|
||||||
|
if l<>2 then
|
||||||
|
halt(1);
|
||||||
|
writeln('ok');
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user