Polymorphic type specialization for procedures

This commit is contained in:
Ginger Bill
2017-07-17 15:08:36 +01:00
parent 054948e701
commit 9a8759efef
8 changed files with 309 additions and 91 deletions

View File

@@ -2215,6 +2215,9 @@ AstNode *convert_stmt_to_body(AstFile *f, AstNode *stmt) {
syntax_error(stmt, "Expected a normal statement rather than a block statement");
return stmt;
}
if (stmt->kind == AstNode_EmptyStmt) {
syntax_error(stmt, "Expected a non-empty statement");
}
GB_ASSERT(is_ast_node_stmt(stmt) || is_ast_node_decl(stmt));
Token open = ast_node_token(stmt);
Token close = ast_node_token(stmt);