From de92d049b618ebf6d739ac7bdcf8fd54b1cc48bc Mon Sep 17 00:00:00 2001 From: Juha Date: Sun, 26 Mar 2023 09:00:53 +0300 Subject: [PATCH] =?UTF-8?q?Jedi=20Code=20Format:=20Do=20not=20break=20line?= =?UTF-8?q?=20in=20generic=20method=20with=20"class".=20Issue=20#40180,=20?= =?UTF-8?q?patch=20by=20Domingo=20Galm=C3=A9s.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/jcf2/Process/Returns/ReturnBefore.pas | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/jcf2/Process/Returns/ReturnBefore.pas b/components/jcf2/Process/Returns/ReturnBefore.pas index 0188a95c6f..776ee32985 100644 --- a/components/jcf2/Process/Returns/ReturnBefore.pas +++ b/components/jcf2/Process/Returns/ReturnBefore.pas @@ -304,7 +304,11 @@ begin if (pt.TokenType = ttClass) and pt.HasParentNode(ProcedureHeadings) and (not IsGenericFunctionOrProperty(pt)) and (RoundBracketLevel(pt) < 1) then - exit(True); + begin + // 'class' is not a type: procedure DisplayItems(TheItems: TEnumerable); + if pt.PriorSolidTokenType<>ttColon then + exit(True); + end; { "uses UnitName in 'File'" has a blank line before UnitName } if IsIdentifier(pt, idStrict) and (pt.HasParentNode(nUses)) and (ptNext.TokenType = ttIn) then