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