* a callnode for an anonymous function can have its procdefinition fixed, thus avoid the need to check for overloads

This commit is contained in:
Sven/Sarah Barth 2022-12-30 16:16:03 +01:00
parent 5d7e3ca240
commit 1d73dab2b0

View File

@ -1155,6 +1155,10 @@ implementation
end
else
p1:=ccallnode.create(para,tprocsym(sym),st,p1,callflags,spezcontext);
{ in case of calling an anonynmous function we already know the concrete
procdef that is going to be called }
if (tprocsym(sym).ProcdefList.count=1) and (po_anonymous in tprocdef(tprocsym(sym).procdeflist[0]).procoptions) then
tcallnode(p1).procdefinition:=tprocdef(tprocsym(sym).procdeflist[0]);
end;
afterassignment:=prevafterassn;
end;