|
@@ -4152,13 +4152,18 @@ implementation
|
|
tprocdef(result).aliasnames.concatListcopy(aliasnames);
|
|
tprocdef(result).aliasnames.concatListcopy(aliasnames);
|
|
if assigned(funcretsym) then
|
|
if assigned(funcretsym) then
|
|
begin
|
|
begin
|
|
- if (funcretsym.owner=parast) then
|
|
|
|
|
|
+ if funcretsym.owner=parast then
|
|
begin
|
|
begin
|
|
j:=parast.symlist.indexof(funcretsym);
|
|
j:=parast.symlist.indexof(funcretsym);
|
|
if j<0 then
|
|
if j<0 then
|
|
internalerror(2011040606);
|
|
internalerror(2011040606);
|
|
tprocdef(result).funcretsym:=tsym(tprocdef(result).parast.symlist[j]);
|
|
tprocdef(result).funcretsym:=tsym(tprocdef(result).parast.symlist[j]);
|
|
end
|
|
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
|
|
else
|
|
internalerror(2011040605);
|
|
internalerror(2011040605);
|
|
end;
|
|
end;
|