compiler: don't remove 'self' if the method is static but not a class method

git-svn-id: trunk@14579 -
This commit is contained in:
paul 2010-01-08 17:28:43 +00:00
parent 58c71c3c59
commit 2fdf045e74

View File

@ -2774,12 +2774,15 @@ const
if not (po_staticmethod in currpd.procoptions) then if not (po_staticmethod in currpd.procoptions) then
begin begin
include(currpd.procoptions, po_staticmethod); include(currpd.procoptions, po_staticmethod);
{ remove self from the hidden paras } if (po_classmethod in currpd.procoptions) then
symentry:=currpd.parast.Find('self');
if symentry<>nil then
begin begin
currpd.parast.Delete(symentry); { remove self from the hidden paras }
currpd.calcparas; symentry:=currpd.parast.Find('self');
if symentry<>nil then
begin
currpd.parast.Delete(symentry);
currpd.calcparas;
end;
end; end;
end; end;
end; end;