mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-25 09:03:14 +01:00
Don't assert on empty foreach body.
Fixes: run/f/foreach_28_B
This commit is contained in:
@@ -913,7 +913,6 @@ void ForeachStatement::toIR(IRState* p)
|
||||
|
||||
//assert(arguments->dim == 1);
|
||||
assert(value != 0);
|
||||
assert(body != 0);
|
||||
assert(aggr != 0);
|
||||
assert(func != 0);
|
||||
|
||||
@@ -1011,7 +1010,8 @@ void ForeachStatement::toIR(IRState* p)
|
||||
|
||||
// emit body
|
||||
p->loopbbs.push_back(IRLoopScope(this,enclosinghandler,nextbb,endbb));
|
||||
body->toIR(p);
|
||||
if(body)
|
||||
body->toIR(p);
|
||||
p->loopbbs.pop_back();
|
||||
|
||||
if (!p->scopereturned())
|
||||
|
||||
Reference in New Issue
Block a user