summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0385.pp
blob: 28779e3d390cd2be6a2ae11a9eb83e1f9251d58d (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
29
var
  count : longint;

procedure p1(w:word);overload;
begin
  writeln('word');
  count:=count or 1;
end;

procedure p1(l:longint);overload;
begin
  writeln('longint');
  count:=count or 2;
end;

var
  f1 : procedure(l:longint);
  f2 : procedure(w:word);
begin
  f1:=@p1;
  f2:=@p1;
  f1(1);
  f2(1);
  if count<>3 then
   begin
     writeln('ERROR!');
     halt(1);
   end;
end.