summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw11139.pp
blob: 903ee5e7f3a936a6664fb6f310e8d74baaa68362 (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
function f(c: char): char; overload;
begin
  halt(1);
end;

function f(const s: shortstring): shortstring; overload;
begin
  f:=lowercase(s);
end;

function f(const a: ansistring): ansistring; overload;
begin
  halt(3);
end;

Procedure DoIt;
var avar:variant;
      txt:String;
Begin
avar:='Hello';
txt:=f(avar);//this line causes the compilation error
if (txt<>'hello') then
  halt(4);
end;

begin
  doit;
end.