mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-25 11:37:16 +01:00
* overload with procvar and result of procvar function
This commit is contained in:
parent
6fba28d11a
commit
32b66da465
30
tests/tbs/tb0471.pp
Normal file
30
tests/tbs/tb0471.pp
Normal file
@ -0,0 +1,30 @@
|
||||
const
|
||||
err : boolean = true;
|
||||
|
||||
type
|
||||
tf = function:longint;
|
||||
procedure p1(l:longint);overload;
|
||||
begin
|
||||
writeln('longint');
|
||||
end;
|
||||
|
||||
|
||||
procedure p1(f:tf);overload;
|
||||
begin
|
||||
writeln('procvar');
|
||||
err:=false;
|
||||
end;
|
||||
|
||||
function vf:longint;
|
||||
begin
|
||||
vf:=10;
|
||||
end;
|
||||
|
||||
var
|
||||
v : tf;
|
||||
begin
|
||||
v:=vf;
|
||||
p1(v);
|
||||
if err then
|
||||
halt(1);
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user