* initialize allow_array_constructor for each compilation run, fixes probably #12283

git-svn-id: trunk@13360 -
This commit is contained in:
florian 2009-07-04 15:44:33 +00:00
parent e4e62b2ac0
commit 04402dd6cc
3 changed files with 5 additions and 3 deletions

View File

@ -122,7 +122,8 @@ interface
(tok:_ASSIGNMENT;nod:assignn;op_overloading_supported:true), { unary overloading supported }
(tok:_UNEQUAL ;nod:unequaln;op_overloading_supported:false) { binary overloading NOT supported overload = instead }
);
const
{ true, if we are parsing stuff which allows array constructors }
allow_array_constructor : boolean = false;
function node2opstr(nt:tnodetype):string;

View File

@ -837,7 +837,7 @@ implementation
Do this only if we didn't convert the arrayconstructor yet. This
is needed for the cases where the resultdef is forced for a second
run }
if (not allow_array_constructor) then
if not(allow_array_constructor) then
begin
hp:=tarrayconstructornode(getcopy);
arrayconstructor_to_set(tnode(hp));

View File

@ -49,7 +49,7 @@ implementation
script,gendef,
comphook,
scanner,scandir,
pbase,ptype,psystem,pmodules,psub,ncgrtti,
pbase,ptype,psystem,pmodules,psub,ncgrtti,htypechk,
cresstr,cpuinfo,procinfo;
@ -337,6 +337,7 @@ implementation
named_args_allowed:=false;
got_addrn:=false;
getprocvardef:=nil;
allow_array_constructor:=false;
{ show info }
Message1(parser_i_compiling,filename);