浏览代码

* skip the funcretsym in tprocdef.getcopy in case it's in the localst,
because in that case it will be inserted while parsing the body
(instead of giving an internalerror)

git-svn-id: branches/jvmbackend@18633 -

Jonas Maebe 14 年之前
父节点
当前提交
390bf35b52
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      compiler/symdef.pas

+ 6 - 1
compiler/symdef.pas

@@ -4152,13 +4152,18 @@ implementation
         tprocdef(result).aliasnames.concatListcopy(aliasnames);
         if assigned(funcretsym) then
           begin
-            if (funcretsym.owner=parast) then
+            if funcretsym.owner=parast then
               begin
                 j:=parast.symlist.indexof(funcretsym);
                 if j<0 then
                   internalerror(2011040606);
                 tprocdef(result).funcretsym:=tsym(tprocdef(result).parast.symlist[j]);
               end
+            else if funcretsym.owner=localst then
+              begin
+                { nothing to do, will be inserted for the new procdef while
+                  parsing its body (by pdecsub.insert_funcret_local) }
+              end
             else
               internalerror(2011040605);
           end;