瀏覽代碼

* keep track which nested function definition the new method has been converted from

Sven/Sarah Barth 1 年之前
父節點
當前提交
1853d1ddd8
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      compiler/procdefutil.pas
  2. 1 0
      compiler/symdef.pas

+ 1 - 0
compiler/procdefutil.pas

@@ -993,6 +993,7 @@ implementation
           { the nested function needs access to the parent's framepointer to
             access the capturer }
           insert_parentfp_para(pinested.procdef);
+          pd.copied_from:=pinested.procdef;
         end;
       { to simplify some checks, but only after insert_funcret_para }
       pd.was_anonymous:=true;

+ 1 - 0
compiler/symdef.pas

@@ -907,6 +907,7 @@ interface
 {$endif}
           { only needed when actually compiling a unit, no need to save/load from ppu }
           invoke_helper : tprocdef;
+          copied_from : tprocdef;
           constructor create(level:byte;doregister:boolean);virtual;
           constructor ppuload(ppufile:tcompilerppufile);
           destructor  destroy;override;