<div dir="ltr"><div>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.</div><div><br></div>program Project1;<br><br>{$mode delphi}<br><br>type<br>  TSuit = (suHeart, suDiamond, suClub, suSpade);<br>  TRedSuit = suHeart..suDiamond;<br><br>var<br>  Suit: TRedSuit;<br>begin<div>  // This should generate an error, but {$mode delphi} allows it<br>  Suit := suClub;<br>end. <br></div></div>