codetools: treat method which contains only an inherited call as an empty method

git-svn-id: trunk@35755 -
This commit is contained in:
paul 2012-03-06 00:48:52 +00:00
parent 77eb6ab37f
commit f9cbe3fbe2

View File

@ -842,6 +842,16 @@ begin
LastPos:=CurPos.EndPos;
ReadNextAtom;
if FindNextNonSpace(Src,LastPos)<>CurPos.StartPos then exit;
// inherited is allowed
if UpAtomIs('INHERITED') then begin
ReadNextAtom;
if CurPos.Flag=cafSemicolon then begin
// semicolon is allowed
LastPos:=CurPos.EndPos;
ReadNextAtom;
if FindNextNonSpace(Src,LastPos)<>CurPos.StartPos then exit;
end;
end;
if not UpAtomIs('END') then exit;
Result:=true;
end;