瀏覽代碼

* Avoid double begin/end

git-svn-id: trunk@46889 -
michael 4 年之前
父節點
當前提交
f8b5c81b8b
共有 1 個文件被更改,包括 4 次插入1 次删除
  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
     if DoBeginEnd then
       AddLn('begin');
       AddLn('begin');
     IncIndent;
     IncIndent;
-    WriteImplElement(AIfElse.IfBranch, False);
+    if AIfElse.IfBranch is TPasImplBeginBlock then
+       WriteImplBlock(TPasImplBeginBlock(AIfElse.IfBranch))
+     else
+       WriteImplElement(AIfElse.IfBranch, False);
     DecIndent;
     DecIndent;
     if DoBeginEnd then
     if DoBeginEnd then
       begin
       begin