Forráskód Böngészése

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

Sven/Sarah Barth 1 éve
szülő
commit
ca0323d4ca
1 módosított fájl, 3 hozzáadás és 0 törlés
  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);