comparison 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
comparison
equal deleted inserted replaced
900:177afbf5297b 901:d51551cb3a85
2332 s = new ExpStatement(loc, e); 2332 s = new ExpStatement(loc, e);
2333 } 2333 }
2334 2334
2335 a->reserve(4); 2335 a->reserve(4);
2336 a->push(body); 2336 a->push(body);
2337 a->push(new BreakStatement(loc, NULL)); 2337
2338 // LDC needs semantic to be run on break
2339 Statement *breakstmt = new BreakStatement(loc, NULL);
2340 breakstmt->semantic(sc);
2341 a->push(breakstmt);
2342
2338 sc->sw->sdefault = new DefaultStatement(loc, s); 2343 sc->sw->sdefault = new DefaultStatement(loc, s);
2339 a->push(sc->sw->sdefault); 2344 a->push(sc->sw->sdefault);
2340 cs = new CompoundStatement(loc, a); 2345 cs = new CompoundStatement(loc, a);
2341 body = cs; 2346 body = cs;
2342 } 2347 }