소스 검색

* 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;