Explorar el Código

* fix for read(subranges) with subrange typ already being sinttype

peter hace 21 años
padre
commit
17f31d70c2
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7 2
      compiler/ninl.pas

+ 7 - 2
compiler/ninl.pas

@@ -747,7 +747,9 @@ implementation
                     if do_read and
                     if do_read and
                       ((is_ordinal and
                       ((is_ordinal and
                         not(torddef(para.left.resulttype.def).typ in hasownreadfunc) and
                         not(torddef(para.left.resulttype.def).typ in hasownreadfunc) and
-                        (para.left.resulttype.def.size<>sinttype.def.size)
+                        { Don't allow subranges to match }
+                        (para.left.resulttype.def<>sinttype.def) and
+                        (para.left.resulttype.def<>uinttype.def)
                        ) or
                        ) or
                        (is_real and
                        (is_real and
                         not equal_defs(para.left.resulttype.def,pbestrealtype^.def)
                         not equal_defs(para.left.resulttype.def,pbestrealtype^.def)
@@ -2441,7 +2443,10 @@ begin
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.143  2004-08-25 15:56:35  peter
+  Revision 1.144  2004-09-13 20:32:06  peter
+    * fix for read(subranges) with subrange typ already being sinttype
+
+  Revision 1.143  2004/08/25 15:56:35  peter
     * fix sqr() and abs() constant range check errors
     * fix sqr() and abs() constant range check errors
 
 
   Revision 1.142  2004/08/08 16:00:56  florian
   Revision 1.142  2004/08/08 16:00:56  florian