Is the following a bug in the compiler or a feature? Is would seem using
{$mode delphi} allows code which clearly violates range bound to compile
without error.

program Project1;

{$mode delphi}

type
  TSuit = (suHeart, suDiamond, suClub, suSpade);
  TRedSuit = suHeart..suDiamond;

var
  Suit: TRedSuit;
begin
  // This should generate an error, but {$mode delphi} allows it
  Suit := suClub;
end.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to