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
begin
include(currpd.procoptions, po_staticmethod);
{ remove self from the hidden paras }
symentry:=currpd.parast.Find('self');
if symentry<>nil then
if (po_classmethod in currpd.procoptions) then
begin
currpd.parast.Delete(symentry);
currpd.calcparas;
{ remove self from the hidden paras }
symentry:=currpd.parast.Find('self');
if symentry<>nil then
begin
currpd.parast.Delete(symentry);
currpd.calcparas;
end;
end;
end;
end;