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,6 +2774,8 @@ 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);
if (po_classmethod in currpd.procoptions) then
begin
{ remove self from the hidden paras } { remove self from the hidden paras }
symentry:=currpd.parast.Find('self'); symentry:=currpd.parast.Find('self');
if symentry<>nil then if symentry<>nil then
@ -2783,6 +2785,7 @@ const
end; end;
end; end;
end; end;
end;
{ Check if the procedure type and return type are correct, { Check if the procedure type and return type are correct,
also the parameters must match also with the type } also the parameters must match also with the type }