* allow implicit conversions from/to packed char arrays under the

same conditions as from/two regular char arrays (since a packed
    char array is the same as a string in ISO Pascal)

git-svn-id: trunk@4468 -
This commit is contained in:
Jonas Maebe 2006-08-20 15:14:07 +00:00
parent 7eb023d7cd
commit 47eb589d54

View File

@ -601,9 +601,17 @@ implementation
case def_from.deftype of
arraydef :
begin
{ from/to packed array }
if is_packed_array(def_from) xor
is_packed_array(def_to) then
{ from/to packed array -- packed chararrays are }
{ strings in ISO Pascal (at least if the lower bound }
{ is 1, but GPC makes all equal-length chararrays }
{ compatible), so treat those the same as regular }
{ char arrays }
if (is_packed_array(def_from) and
not is_chararray(def_from) and
not is_widechararray(def_from)) xor
(is_packed_array(def_to) and
not is_chararray(def_to) and
not is_widechararray(def_to)) then
{ both must be packed }
begin
compare_defs_ext:=te_incompatible;