Browse Source

two new bugs found

pierre 26 years ago
parent
commit
13c058d6ef
3 changed files with 32 additions and 0 deletions
  1. 11 0
      bugs/bug0208.pp
  2. 18 0
      bugs/bug0209.pp
  3. 3 0
      bugs/readme.txt

+ 11 - 0
bugs/bug0208.pp

@@ -0,0 +1,11 @@
+program bug0208;
+
+{ implicit boolean to integer conversion should not be
+  allowed }
+var
+  b : boolean;
+  i : longint;
+begin
+  b:=true;
+  i:=b;
+end.

+ 18 - 0
bugs/bug0209.pp

@@ -0,0 +1,18 @@
+program bug0209;
+
+{ problem with boolean expression mixing different boolean sizes }
+
+var
+  b : boolean;
+  wb : wordbool;
+  lb : longbool;
+begin
+  b:=true;
+  wb:=true;
+  lb:=true;
+  if (not b) or (not wb) or (not lb) then
+    begin
+       Writeln('Error with boolean expressions of different sizes');
+       Halt(1);
+    end;
+end.

+ 3 - 0
bugs/readme.txt

@@ -271,3 +271,6 @@ bug0204.pp   can typecast the result var in an assignment
 bug0205.pp   and parsing bug, generates wrong code (tp7 gives parser error)
 bug0205.pp   and parsing bug, generates wrong code (tp7 gives parser error)
 bug0206.pp   sets with variable ranges doesn't work
 bug0206.pp   sets with variable ranges doesn't work
 bug0207.pp   a class destructor doesn't release the memory
 bug0207.pp   a class destructor doesn't release the memory
+bug0208.pp   implicit conversion from boolean to longint should not be allowed
+             (this is the reason of bug0205 !)
+bug0209.pp   problem with boolean expressions of different store sizes