fpc/tests/test/tenum6.pp
florian e99c4d1950 + support str(<boolean>,...), boolean is an enumeration type
* don't run pass_1 on str or val calls in generic method/procedure definitions, resolves #18420

git-svn-id: trunk@16849 -
2011-01-30 14:27:09 +00:00

38 lines
444 B
ObjectPascal

var
b : boolean;
b8 : ByteBool;
b16 : WordBool;
b32 : LongBool;
b64 : QWordBool;
s : string;
begin
b:=false;
str(b,s);
if s<>'FALSE' then
halt(1);
b8:=false;
str(b8,s);
if s<>'FALSE' then
halt(1);
b16:=false;
str(b16,s);
if s<>'FALSE' then
halt(1);
b32:=false;
str(b32,s);
if s<>'FALSE' then
halt(1);
b64:=false;
str(b64,s);
if s<>'FALSE' then
halt(1);
writeln('ok');
end.