Jelajahi Sumber

Merged revisions 8384 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r8384 | peter | 2007-09-04 20:31:20 +0200 (Tue, 04 Sep 2007) | 2 lines

* save and restore aktobjectdef

........

git-svn-id: branches/fixes_2_2@8411 -

peter 18 tahun lalu
induk
melakukan
d444dcc95a
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      compiler/pdecobj.pas

+ 3 - 1
compiler/pdecobj.pas

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