mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 10:48:30 +02:00
23 lines
361 B
ObjectPascal
23 lines
361 B
ObjectPascal
{ %OPT=-Oonoconstprop }
|
|
{ Old file: tbs0165.pp }
|
|
{ missing range check code for enumerated types. OK 0.99.9 (PFV) }
|
|
|
|
{$R+}
|
|
Program bug0165;
|
|
|
|
uses
|
|
erroru;
|
|
|
|
{ No range check when -Cr given}
|
|
|
|
Type Directions = (North, East,South,West);
|
|
|
|
Var Go : Directions;
|
|
|
|
|
|
begin
|
|
Require_Error(201);
|
|
Go:=North;
|
|
Go:=Pred(Go); { must give run-time error }
|
|
end.
|