浏览代码

* save and restore aktobjectdef

git-svn-id: trunk@8384 -
peter 18 年之前
父节点
当前提交
0a9b94ca92
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      compiler/pdecobj.pas

+ 3 - 1
compiler/pdecobj.pas

@@ -512,8 +512,10 @@ implementation
         i : longint;
         i : longint;
         generictype : ttypesym;
         generictype : ttypesym;
         current_blocktype : tblock_type;
         current_blocktype : tblock_type;
+        oldaktobjectdef : tobjectdef;
       begin
       begin
          old_object_option:=current_object_option;
          old_object_option:=current_object_option;
+         oldaktobjectdef:=aktobjectdef;
 
 
          { objects and class types can't be declared local }
          { objects and class types can't be declared local }
          if not(symtablestack.top.symtabletype in [globalsymtable,staticsymtable]) then
          if not(symtablestack.top.symtabletype in [globalsymtable,staticsymtable]) then
@@ -826,7 +828,7 @@ implementation
          result:=aktobjectdef;
          result:=aktobjectdef;
 
 
          { restore old state }
          { restore old state }
-         aktobjectdef:=nil;
+         aktobjectdef:=oldaktobjectdef;
          testcurobject:=0;
          testcurobject:=0;
          typecanbeforward:=storetypecanbeforward;
          typecanbeforward:=storetypecanbeforward;
          current_object_option:=old_object_option;
          current_object_option:=old_object_option;