Răsfoiți Sursa

Also look for function name of 'result' is not found in load_result_node

git-svn-id: trunk@47208 -
pierre 4 ani în urmă
părinte
comite
bf5b85e5e5
1 a modificat fișierele cu 8 adăugiri și 1 ștergeri
  1. 8 1
      compiler/nutils.pas

+ 8 - 1
compiler/nutils.pas

@@ -562,9 +562,16 @@ implementation
     function load_result_node:tnode;
       var
         srsym : tsym;
-      begin
+        pd : tprocdef;
+       begin
         result:=nil;
         srsym:=get_local_or_para_sym('result');
+        if not assigned(srsym) then
+          begin
+            pd:=current_procinfo.procdef;
+            if assigned(pd.procsym) then
+              srsym:=get_local_or_para_sym(pd.procsym.name);
+          end;
         if assigned(srsym) then
           result:=cloadnode.create(srsym,srsym.owner)
         else