This commit is contained in:
Christian Kamm
2009-01-22 21:46:40 +01:00
parent ab9b9cc2e9
commit 320c22810a
2 changed files with 11 additions and 1 deletions

View File

@@ -2334,7 +2334,12 @@ Statement *SwitchStatement::semantic(Scope *sc)
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);

View File

@@ -0,0 +1,5 @@
void main()
{
scope Object o;
switch(0) {}
}