Jedi Code Format: Fix strict private/protected after var declarations. Issue #38082, patch from Domingo Galmés.

git-svn-id: trunk@64140 -
This commit is contained in:
juha 2020-11-15 13:33:04 +00:00
parent 292bf5f43a
commit 8e52758eb7
2 changed files with 4 additions and 4 deletions

View File

@ -1032,7 +1032,7 @@ begin
leFirstTokenType := fcTokenList.FirstSolidTokenType;
if pbNestedInClass then
begin
if (leFirstTokenType in ClassVisibility) then
if leFirstTokenType in (ClassVisibility+[ttStrict]) then
break;
if leFirstTokenType in [ttClass,ttVar,ttThreadVar,ttConst,ttFunction,ttProcedure,ttOperator,ttConstructor,ttDestructor,ttProperty] then
break;
@ -1108,7 +1108,7 @@ begin
if pbNestedInClass then
begin
if (fcTokenList.FirstSolidTokenType in ClassVisibility) then
if fcTokenList.FirstSolidTokenType in (ClassVisibility + [ttStrict]) then
break;
if fcTokenList.FirstSolidTokenType in [ttClass,ttVar,ttThreadVar, ttConst,ttFunction,ttProcedure,ttOperator,ttConstructor,ttDestructor,ttProperty] then
break;
@ -2320,7 +2320,7 @@ var
begin
leEndVarSection := END_VAR_SECTION;
if pbClassVars then
leEndVarSection := leEndVarSection + ClassVisibility;
leEndVarSection := leEndVarSection + ClassVisibility + [ttStrict];
if pbClassVars and (fcTokenList.FirstSolidTokenType=ttClass) then
begin

View File

@ -267,7 +267,7 @@ end;
{ true if the "AddGoodReturns" setting wants a return here }
function NeedsGoodReturn(const pt, ptNext: TSourceToken): boolean;
const
CLASS_FOLLOW = [ttOf, ttHelper];
CLASS_FOLLOW = [ttOf, ttHelper, ttAbstract, ttSealed];
var
lcNext: TSourceToken;
begin