aboutsummaryrefslogtreecommitdiff
path: root/src/stage1/ir.cpp
diff options
context:
space:
mode:
authorMathieu Guay-Paquet <mathieu.guaypaquet@gmail.com>2021-02-16 21:51:19 -0500
committerMathieu Guay-Paquet <mathieu.guaypaquet@gmail.com>2021-02-16 21:51:19 -0500
commitc0cfbe98f3069d1aabb29fb0e795c6582e88b75e (patch)
treed1ffeb7de1307ff580f23d729b8f39a3f8e95505 /src/stage1/ir.cpp
parent9270aae071a4ee840193afe1162b24945cbd6d9e (diff)
downloadzig-c0cfbe98f3069d1aabb29fb0e795c6582e88b75e.tar.gz
zig-c0cfbe98f3069d1aabb29fb0e795c6582e88b75e.zip
Allow resume in nosuspend scope
Resuming a suspended async function call is actually a synchronous operation. This commit removes the compiler code which generates the error and updates the relevant test case.
Diffstat (limited to 'src/stage1/ir.cpp')
-rw-r--r--src/stage1/ir.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/stage1/ir.cpp b/src/stage1/ir.cpp
index 7906df3b0d..c418149546 100644
--- a/src/stage1/ir.cpp
+++ b/src/stage1/ir.cpp
@@ -10095,10 +10095,6 @@ static IrInstSrc *ir_gen_fn_proto(IrBuilderSrc *irb, Scope *parent_scope, AstNod
static IrInstSrc *ir_gen_resume(IrBuilderSrc *irb, Scope *scope, AstNode *node) {
assert(node->type == NodeTypeResume);
- if (get_scope_nosuspend(scope) != nullptr) {
- add_node_error(irb->codegen, node, buf_sprintf("resume in nosuspend scope"));
- return irb->codegen->invalid_inst_src;
- }
IrInstSrc *target_inst = ir_gen_node_extra(irb, node->data.resume_expr.expr, scope, LValPtr, nullptr);
if (target_inst == irb->codegen->invalid_inst_src)