Browse Source

* handle string-open array of (wide)char without variants

peter 20 years ago
parent
commit
ed7084e0b6
1 changed files with 9 additions and 3 deletions
  1. 9 3
      compiler/htypechk.pas

+ 9 - 3
compiler/htypechk.pas

@@ -229,7 +229,9 @@ implementation
                    exit;
                  end;
                 { not chararray+[(wide)char,(wide)string,(wide)chararray] }
-                if (is_chararray(ld) or is_widechararray(ld)) and
+                if (is_chararray(ld) or is_widechararray(ld) or
+                    (is_open_array(ld) and (is_char(tarraydef(ld).elementtype.def) or is_widechar(tarraydef(ld).elementtype.def)))
+                   ) and
                    ((rd.deftype in [stringdef,orddef,enumdef]) or
                     is_pchar(rd) or
                     is_pwidechar(rd) or
@@ -269,7 +271,8 @@ implementation
                     is_pchar(rd) or
                     is_pwidechar(rd) or
                     is_chararray(rd) or
-                    is_widechararray(rd)) then
+                    is_widechararray(rd) or
+                    (is_open_array(rd) and (is_char(tarraydef(rd).elementtype.def) or is_widechar(tarraydef(rd).elementtype.def)))) then
                  begin
                    allowed:=false;
                    exit;
@@ -1971,7 +1974,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.106  2004-12-05 12:28:10  peter
+  Revision 1.107  2005-01-07 16:22:47  peter
+    * handle string-open array of (wide)char without variants
+
+  Revision 1.106  2004/12/05 12:28:10  peter
     * procvar handling for tp procvar mode fixed
     * proc to procvar moved from addrnode to typeconvnode
     * inlininginfo is now allocated only for inline routines that