mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 12:39:25 +02:00
* typed dyn. array constants can be only nil pointer
This commit is contained in:
parent
e4e3b9f0dd
commit
bccb02b0de
@ -703,6 +703,14 @@ implementation
|
||||
end;
|
||||
arraydef:
|
||||
begin
|
||||
{ dynamic array nil }
|
||||
if is_dynamic_array(t.def) then
|
||||
begin
|
||||
{ Only allow nil initialization }
|
||||
consume(_NIL);
|
||||
curconstSegment.concat(Tai_const.Create_sym(nil));
|
||||
end
|
||||
else
|
||||
if try_to_consume(_LKLAMMER) then
|
||||
begin
|
||||
for l:=tarraydef(t.def).lowrange to tarraydef(t.def).highrange-1 do
|
||||
@ -754,14 +762,6 @@ implementation
|
||||
end;
|
||||
p.free;
|
||||
end
|
||||
else
|
||||
{ dynamic array nil }
|
||||
if is_dynamic_array(t.def) then
|
||||
begin
|
||||
{ Only allow nil initialization }
|
||||
consume(_NIL);
|
||||
curconstSegment.concat(Tai_const.Create_sym(nil));
|
||||
end
|
||||
else
|
||||
begin
|
||||
{ we want the ( }
|
||||
@ -1081,7 +1081,10 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.97 2004-12-05 12:28:11 peter
|
||||
Revision 1.98 2005-01-08 14:05:31 florian
|
||||
* typed dyn. array constants can be only nil pointer
|
||||
|
||||
Revision 1.97 2004/12/05 12:28:11 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
|
||||
|
Loading…
Reference in New Issue
Block a user