Codetools: Ignore empty () in function description. Generate function body correctly. Issue #39441, patch by Domingo Galmés.

(cherry picked from commit 937b6bdfef)
This commit is contained in:
Juha 2021-10-30 23:08:27 +03:00 committed by Maxim Ganetsky
parent fd7222fae9
commit 63ed2c8183

View File

@ -1500,6 +1500,8 @@ begin
and (Src[CurPos.StartPos] = CloseBracket)
then begin // empty brackets: extract also the closing bracket.
ExtractNextAtom(not (phpWithoutBrackets in Attr),Attr);
if (not (phpWithoutBrackets in Attr)) and (CloseBracket=')') then // delete empty '()'
ExtractMemStream.Position:=ExtractMemStream.Position-2;
exit(true);
end;
end;