Преглед изворни кода

* the adjusted nested function needs to access the parent function for the capturer

Sven/Sarah Barth пре 1 година
родитељ
комит
ca0323d4ca
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      compiler/procdefutil.pas

+ 3 - 0
compiler/procdefutil.pas

@@ -990,6 +990,9 @@ implementation
           pd.funcretsym:=pinested.procdef.funcretsym;
           pinested.procdef.funcretsym:=nil;
           insert_funcret_local(pinested.procdef);
+          { the nested function needs access to the parent's framepointer to
+            access the capturer }
+          insert_parentfp_para(pinested.procdef);
         end;
       capturedef.symtable.insertsym(ps);
       owner.addnestedproc(pi);