فهرست منبع

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