2
0
Эх сурвалжийг харах

* fix check for typecasting wrong sizes in assignment left

peter 22 жил өмнө
parent
commit
6ec273a878

+ 5 - 2
compiler/htypechk.pas

@@ -744,10 +744,10 @@ implementation
                  todef:=hp.resulttype.def;
                  todef:=hp.resulttype.def;
                  if not((fromdef.deftype=formaldef) or
                  if not((fromdef.deftype=formaldef) or
                         is_void(fromdef) or
                         is_void(fromdef) or
+                        is_open_array(fromdef) or
                         ((fromdef.deftype=pointerdef) and (todef.deftype=arraydef)) or
                         ((fromdef.deftype=pointerdef) and (todef.deftype=arraydef)) or
                         ((fromdef.deftype = objectdef) and (todef.deftype = objectdef) and
                         ((fromdef.deftype = objectdef) and (todef.deftype = objectdef) and
                          (tobjectdef(fromdef).is_related(tobjectdef(todef))))) and
                          (tobjectdef(fromdef).is_related(tobjectdef(todef))))) and
-                    is_open_array(fromdef) and
                     (fromdef.size<>todef.size) then
                     (fromdef.size<>todef.size) then
                   begin
                   begin
                     { in TP it is allowed to typecast to smaller types }
                     { in TP it is allowed to typecast to smaller types }
@@ -941,7 +941,10 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.69  2003-10-08 19:19:45  peter
+  Revision 1.70  2003-10-20 19:29:12  peter
+    * fix check for typecasting wrong sizes in assignment left
+
+  Revision 1.69  2003/10/08 19:19:45  peter
     * set_varstate cleanup
     * set_varstate cleanup
 
 
   Revision 1.68  2003/10/05 21:21:52  peter
   Revision 1.68  2003/10/05 21:21:52  peter