diff dmd/statement.c @ 901:d51551cb3a85

Fix #174.
author Christian Kamm <kamm incasoftware de>
date Thu, 22 Jan 2009 21:46:40 +0100
parents 330f999ade44
children 6690a1468c17
line wrap: on
line diff
--- a/dmd/statement.c	Thu Jan 22 18:53:32 2009 +0100
+++ b/dmd/statement.c	Thu Jan 22 21:46:40 2009 +0100
@@ -2334,7 +2334,12 @@
 
 	a->reserve(4);
 	a->push(body);
-	a->push(new BreakStatement(loc, NULL));
+
+	// LDC needs semantic to be run on break
+	Statement *breakstmt = new BreakStatement(loc, NULL);
+	breakstmt->semantic(sc);
+	a->push(breakstmt);
+
 	sc->sw->sdefault = new DefaultStatement(loc, s);
 	a->push(sc->sw->sdefault);
 	cs = new CompoundStatement(loc, a);