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

This commit is contained in:
Juha 2021-10-30 23:08:27 +03:00
parent bdd25fd5e7
commit 937b6bdfef

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;