* ensure that newly created tloadparentfpnodes have a valid resultdef as they might be created in situation where the loadnode itself is no longer typechecked

This commit is contained in:
Sven/Sarah Barth 2022-11-06 16:49:06 +01:00
parent 7243befdb7
commit 3c2703787c
2 changed files with 2 additions and 0 deletions

View File

@ -2631,6 +2631,7 @@ implementation
(left.nodetype=loadn) then
begin
tloadnode(left).left:=cloadparentfpnode.create(tprocdef(tloadnode(left).symtable.defowner),lpf_forload);
typecheckpass(tloadnode(left).left);
pi:=current_procinfo.get_first_nestedproc;
while assigned(pi) do

View File

@ -562,6 +562,7 @@ implementation
{ parent frame pointer pointer as "self" }
left.free;
left:=cloadparentfpnode.create(tprocdef(p.owner.defowner),lpf_forpara);
typecheckpass(left);
end;
end
{ we should never go from nested to non-nested (except for an anonymous