Make diverging procedure types different from ones without a return type

This commit is contained in:
gingerBill
2018-09-09 13:48:33 +01:00
parent f5549f6bde
commit 12902821d6
6 changed files with 17 additions and 16 deletions

View File

@@ -1213,7 +1213,7 @@ void check_stmt_internal(CheckerContext *ctx, Ast *node, u32 flags) {
GB_ASSERT(proc_type->kind == Type_Proc);
// Type *proc_type = c->proc_stack[c->proc_stack.count-1];
TypeProc *pt = &proc_type->Proc;
if (pt->no_return) {
if (pt->diverging) {
error(rs->token, "Diverging procedures may not return");
break;
}