瀏覽代碼

* also handle statement nodes in has_no_code()

git-svn-id: trunk@14907 -
Jonas Maebe 15 年之前
父節點
當前提交
efcc6f6440
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      compiler/nutils.pas

+ 8 - 0
compiler/nutils.pas

@@ -1114,6 +1114,14 @@ implementation
               result:=has_no_code(tblocknode(n).left);
               exit;
             end;
+          statementn:
+            begin
+              repeat
+                result:=has_no_code(tstatementnode(n).left);
+                n:=tstatementnode(n).right;
+              until not(result) or not assigned(n);
+              exit;
+            end;
         end;
       end;