Browse Source

+ Added bug #165

michael 27 years ago
parent
commit
d2204ea2ae
2 changed files with 14 additions and 0 deletions
  1. 13 0
      bugs/bug0165.pp
  2. 1 0
      bugs/readme.txt

+ 13 - 0
bugs/bug0165.pp

@@ -0,0 +1,13 @@
+Program bug0165;
+
+{ No range check when -Cr given}
+
+Type Directions = (North, East,South,West);
+
+Var Go : Directions;
+
+begin
+  Go:=North;
+  Go:=Pred(Go); { must give run-time error }
+  Go:=Pred(North); { must give compile time error }
+end.

+ 1 - 0
bugs/readme.txt

@@ -219,3 +219,4 @@ bug0161.pp   internal error when trying to create a set with another set as
              its element (instead of a syntax error)
 bug0162.pp   continue in repeat ... until loop doesn't work correct
 bug0163.pp   missing <= and >= operators for sets.
+bug0165.pp   missing range check code for enumerated types.