summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw11139.pp
blob: 6c00193367128af83a2ec82ebe55ae882b89f48f (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
  halt(3);
end;

function f(const a: ansistring): ansistring; overload;
begin
  f:=lowercase(a);
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.