mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 23:40:14 +02:00
* initialize allow_array_constructor for each compilation run, fixes probably #12283
git-svn-id: trunk@13360 -
This commit is contained in:
parent
e4e62b2ac0
commit
04402dd6cc
@ -122,7 +122,8 @@ interface
|
|||||||
(tok:_ASSIGNMENT;nod:assignn;op_overloading_supported:true), { unary overloading supported }
|
(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 }
|
(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;
|
allow_array_constructor : boolean = false;
|
||||||
|
|
||||||
function node2opstr(nt:tnodetype):string;
|
function node2opstr(nt:tnodetype):string;
|
||||||
|
@ -837,7 +837,7 @@ implementation
|
|||||||
Do this only if we didn't convert the arrayconstructor yet. This
|
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
|
is needed for the cases where the resultdef is forced for a second
|
||||||
run }
|
run }
|
||||||
if (not allow_array_constructor) then
|
if not(allow_array_constructor) then
|
||||||
begin
|
begin
|
||||||
hp:=tarrayconstructornode(getcopy);
|
hp:=tarrayconstructornode(getcopy);
|
||||||
arrayconstructor_to_set(tnode(hp));
|
arrayconstructor_to_set(tnode(hp));
|
||||||
|
@ -49,7 +49,7 @@ implementation
|
|||||||
script,gendef,
|
script,gendef,
|
||||||
comphook,
|
comphook,
|
||||||
scanner,scandir,
|
scanner,scandir,
|
||||||
pbase,ptype,psystem,pmodules,psub,ncgrtti,
|
pbase,ptype,psystem,pmodules,psub,ncgrtti,htypechk,
|
||||||
cresstr,cpuinfo,procinfo;
|
cresstr,cpuinfo,procinfo;
|
||||||
|
|
||||||
|
|
||||||
@ -337,6 +337,7 @@ implementation
|
|||||||
named_args_allowed:=false;
|
named_args_allowed:=false;
|
||||||
got_addrn:=false;
|
got_addrn:=false;
|
||||||
getprocvardef:=nil;
|
getprocvardef:=nil;
|
||||||
|
allow_array_constructor:=false;
|
||||||
|
|
||||||
{ show info }
|
{ show info }
|
||||||
Message1(parser_i_compiling,filename);
|
Message1(parser_i_compiling,filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user