From efcc6f644034c57191dad52e0a9f0a1b275201f3 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 13 Feb 2010 20:48:38 +0000 Subject: [PATCH] * also handle statement nodes in has_no_code() git-svn-id: trunk@14907 - --- compiler/nutils.pas | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/compiler/nutils.pas b/compiler/nutils.pas index 91af18d4eb..64fd489526 100644 --- a/compiler/nutils.pas +++ b/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;