Browse Source

* fixed constant not(boolean)

peter 27 years ago
parent
commit
903713b09e
1 changed files with 8 additions and 2 deletions
  1. 8 2
      compiler/tcmat.pas

+ 8 - 2
compiler/tcmat.pas

@@ -272,7 +272,10 @@ implementation
 
 
          if (p^.left^.treetype=ordconstn) then
          if (p^.left^.treetype=ordconstn) then
            begin
            begin
-              t:=genordinalconstnode(not(p^.left^.value),p^.left^.resulttype);
+              if is_boolean(p^.left^.resulttype) then
+               t:=genordinalconstnode(byte(not(boolean(p^.left^.value))),p^.left^.resulttype)
+              else
+               t:=genordinalconstnode(not(p^.left^.value),p^.left^.resulttype);
               disposetree(p);
               disposetree(p);
               firstpass(t);
               firstpass(t);
               p:=t;
               p:=t;
@@ -328,7 +331,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.6  1998-11-05 14:26:01  peter
+  Revision 1.7  1998-11-13 10:16:38  peter
+    * fixed constant not(boolean)
+
+  Revision 1.6  1998/11/05 14:26:01  peter
     * fixed shlshr which would push ecx when not needed
     * fixed shlshr which would push ecx when not needed
 
 
   Revision 1.5  1998/10/20 13:12:39  peter
   Revision 1.5  1998/10/20 13:12:39  peter