diff dmd/CompoundStatement.d @ 79:43073c7c7769

updated to 2.035 also implemented a few missing functions still crashes in Import.importAll though
author Trass3r
date Mon, 30 Aug 2010 03:57:51 +0200
parents 2e2a5c3f943a
children df6d0f967680
line wrap: on
line diff
--- a/dmd/CompoundStatement.d	Sun Aug 29 14:39:08 2010 +0100
+++ b/dmd/CompoundStatement.d	Mon Aug 30 03:57:51 2010 +0200
@@ -218,12 +218,14 @@
 				//printf("%s\n", s->toChars());
 				if (!(result & BE.BEfallthru) && !s.comeFrom())
 				{
-					if (s.blockExit() != BE.BEhalt)
+					if (s.blockExit() != BE.BEhalt && !s.isEmpty())
 						s.warning("statement is not reachable");
 				}
-
-				result &= ~BE.BEfallthru;
-				result |= s.blockExit();
+				else
+				{
+					result &= ~BE.BEfallthru;
+					result |= s.blockExit();
+				}
 			}
 		}