From f8b5c81b8bfa55ba3340854d41d1fb1c88a9d1c2 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 18 Sep 2020 14:30:39 +0000 Subject: [PATCH] * Avoid double begin/end git-svn-id: trunk@46889 - --- packages/fcl-passrc/src/paswrite.pp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/fcl-passrc/src/paswrite.pp b/packages/fcl-passrc/src/paswrite.pp index 2705ba2df8..cf3da304f8 100644 --- a/packages/fcl-passrc/src/paswrite.pp +++ b/packages/fcl-passrc/src/paswrite.pp @@ -1256,7 +1256,10 @@ begin if DoBeginEnd then AddLn('begin'); IncIndent; - WriteImplElement(AIfElse.IfBranch, False); + if AIfElse.IfBranch is TPasImplBeginBlock then + WriteImplBlock(TPasImplBeginBlock(AIfElse.IfBranch)) + else + WriteImplElement(AIfElse.IfBranch, False); DecIndent; if DoBeginEnd then begin