diff options
| author | gingerBill <bill@gingerbill.org> | 2018-09-09 13:48:33 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-09-09 13:48:33 +0100 |
| commit | 12902821d63973e49f34fe5826f1069ca4ea605b (patch) | |
| tree | de0d95adc10257b85c52c361b00b25f49412cb87 /src/check_stmt.cpp | |
| parent | f5549f6bde21c2378700770eae5ab7bba46a3671 (diff) | |
Make diverging procedure types different from ones without a return type
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index f49f7d322..1c6181e77 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -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; } |