mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 12:39:25 +02:00
* 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:
parent
7eb023d7cd
commit
47eb589d54
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user