Browse Source

* Avoid double begin/end

git-svn-id: trunk@46889 -
(cherry picked from commit f8b5c81b8bfa55ba3340854d41d1fb1c88a9d1c2)
michael 4 years ago
parent
commit
a3cb69d857
1 changed files with 4 additions and 1 deletions
  1. 4 1
      packages/fcl-passrc/src/paswrite.pp

+ 4 - 1
packages/fcl-passrc/src/paswrite.pp

@@ -1265,7 +1265,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