fpc/tests/webtbs/tw11139.pp
2012-04-19 08:31:05 +00:00

29 lines
412 B
ObjectPascal

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.