fix functions with no block (but single statement, loop, etc.)

This commit is contained in:
Clifford Wolf 2014-06-06 21:29:23 +02:00
parent c82db39935
commit 5c10d2ee36
1 changed files with 4 additions and 11 deletions

View File

@ -1883,17 +1883,10 @@ AstNode *AstNode::eval_const_function(AstNode *fcall)
continue;
}
if (child->type == AST_ASSIGN_EQ)
{
log_assert(block == NULL);
delete_temp_block = true;
block = new AstNode(AST_BLOCK);
block->children.push_back(child->clone());
continue;
}
child->dumpAst(NULL, "unexpected> ");
log_abort();
log_assert(block == NULL);
delete_temp_block = true;
block = new AstNode(AST_BLOCK);
block->children.push_back(child->clone());
}
log_assert(block != NULL);