mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +02:00
* tassignmentnode.pass_typecheck: also allow "dynarray := []" in addition to "dynarray := nil"
git-svn-id: trunk@36098 -
This commit is contained in:
parent
c6f19b9888
commit
dfc23da06c
@ -626,9 +626,16 @@ implementation
|
||||
converted node (that array is 2^31 or 2^63 bytes large) }
|
||||
exit;
|
||||
|
||||
{ assigning nil to a dynamic array clears the array }
|
||||
{ assigning nil or [] to a dynamic array clears the array }
|
||||
if is_dynamic_array(left.resultdef) and
|
||||
(right.nodetype=niln) then
|
||||
(
|
||||
(right.nodetype=niln) or
|
||||
(
|
||||
(right.nodetype=arrayconstructorn) and
|
||||
(right.resultdef.typ=arraydef) and
|
||||
(tarraydef(right.resultdef).elementdef=voidtype)
|
||||
)
|
||||
) then
|
||||
begin
|
||||
{ remove property flag to avoid errors, see comments for }
|
||||
{ tf_winlikewidestring assignments below }
|
||||
|
Loading…
Reference in New Issue
Block a user