fpc/tests/webtbs/tw11027.pp
Jonas Maebe 62e66d2a56 * explicit typecasting of any ordinal type to a boolean of the same
size must happen without any mangling of the value (mantis #11027)
  * moved checking for signed-to-unsigned (or vice versa) type
    conversions in assignments from htypechk to ncnv (where there
    was already code for similar checks) and added support for
    bool_to_bool there as well

git-svn-id: trunk@10521 -
2008-03-21 14:44:58 +00:00

11 lines
163 B
ObjectPascal

var i : char;
bb: bytebool;
begin
boolean(i) := (1=1);
if not boolean(i) then
halt(1);
boolean(bb):=boolean(i);
if not(bb) then
halt(2);
end.