mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 23:59:30 +02:00
* don't push/pop the unit/program's static symtable on/off the symtable stack
before parsing the main begin/end, because that symtable is already on the symtable stack at that point git-svn-id: trunk@14233 -
This commit is contained in:
parent
25a3cc09ef
commit
9d5b597105
@ -1182,8 +1182,11 @@ implementation
|
||||
if procdef.parast.symtablelevel>=normal_function_level then
|
||||
symtablestack.push(procdef.parast);
|
||||
|
||||
{ insert localsymtable }
|
||||
symtablestack.push(procdef.localst);
|
||||
{ insert localsymtable, except for the main procedure
|
||||
(in that case the localst is the unit's static symtable,
|
||||
which is already on the stack) }
|
||||
if procdef.localst.symtablelevel>=normal_function_level then
|
||||
symtablestack.push(procdef.localst);
|
||||
end;
|
||||
|
||||
|
||||
@ -1192,7 +1195,8 @@ implementation
|
||||
_class : tobjectdef;
|
||||
begin
|
||||
{ remove localsymtable }
|
||||
symtablestack.pop(procdef.localst);
|
||||
if procdef.localst.symtablelevel>=normal_function_level then
|
||||
symtablestack.pop(procdef.localst);
|
||||
|
||||
{ remove parasymtable }
|
||||
if procdef.parast.symtablelevel>=normal_function_level then
|
||||
|
Loading…
Reference in New Issue
Block a user