Explorar o código

* Avoid double begin/end

git-svn-id: trunk@46889 -
michael %!s(int64=5) %!d(string=hai) anos
pai
achega
f8b5c81b8b
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      packages/fcl-passrc/src/paswrite.pp

+ 4 - 1
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